diff --git a/zsh-completions-howto.org b/zsh-completions-howto.org index 5a71570..41bcac5 100644 --- a/zsh-completions-howto.org +++ b/zsh-completions-howto.org @@ -194,6 +194,18 @@ For example: _arguments '-f[input file]:filename:_files' #+END_SRC +| -OPT | single option | +| +OPT | single option beginning with + | +| -+OPT | single option beginning with + or - | +| +-OPT | single option beginning with + or - | +| {-OPT1,--OPT2} | list of alternatives for an option (e.g. short & long forms). This is not a different specification but a trick that relies on braces expansion. | +| -OPT- | indicates the argument of the option must come directly after the option name, e.g. -optARG | +| -OPT+ | indicates the argument of the option may come directly after the option or as a separate word, e.g. -optARG or -opt ARG | +| -OPT= | indicates the argument of the option may come as a separate word, or separated from the option with an = sign, e.g. -opt=ARG or -opt ARG | +| -OPT=- | indicates the argument of the option must appear after an = sign, not as a separate word | +| OPTSPEC[explanation] | the explanation string will be displayed along with the option (OPTSPEC is any of the previously mentioned option specifications) | +| *OPTSPEC | indicates that the option may be repeated (OPTSPEC is any of the previously mentioned option specifications) | +| OPTSPEC:ARG1:ARG2:etc | for specifying options that take arguments (see below for option argument specification) |