romkatv / zsh-defer

Deferred execution of Zsh commands
GNU General Public License v3.0
356 stars 11 forks source link

Clarify README #3

Closed danielshahaf closed 4 years ago

danielshahaf commented 4 years ago

It's a minor thing, but in the following section of README:

## Usage

```text
zsh-defer [{+|-}12dmshpr] [-t duration] [command [args]...]
zsh-defer [{+|-}12dmshpr] [-t duration] -c command
```

Deferred commands are put in a queue (FIFO). Whenever zle is idle, the next command is popped from
the queue. If the command has been queued up with `-t duration`, execution of the command (and
therefore of all queued commands after it) is delayed by the specified duration without
blocking zle. Duration can be specified in any format accepted by `sleep(1)`. After the delay the
command is executed either as `command args..` (first form) or as `eval command` (second form, with
`-c`).

the statement about command args.. made me pause for a moment because I wondered whether it was talking about the command builtin. I suggest to rename the placeholder variable or precede its name with a dollar sign.

romkatv commented 4 years ago

Thanks for the bug report. It indeed looks confusing. I've renamed the placeholder variables and clarified the documentation in a few other places.