diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2022-04-11 00:18:04 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2022-04-11 00:18:04 +0200 |
commit | 31bcc5c263aea983e967426e2b94269e7605dcd4 (patch) | |
tree | 7b48ad9d7799afe09b7d7d8adc980bd5db935bdf /Completion/Zsh/Function/__arguments | |
parent | 5086b5356abcef8849dc8a09902b7c55f01db3c0 (diff) | |
parent | b09f4483416c54c1782824633dfabaf2ec0265b6 (diff) | |
download | zsh-31bcc5c263aea983e967426e2b94269e7605dcd4.tar.gz zsh-31bcc5c263aea983e967426e2b94269e7605dcd4.zip |
Update upstream source from tag 'upstream/5.8.1.2-test'
Update to upstream version '5.8.1.2-test'
with Debian dir b380d582bf51cd93149e4dea28fffa1ad85db4f5
Diffstat (limited to 'Completion/Zsh/Function/__arguments')
-rw-r--r-- | Completion/Zsh/Function/__arguments | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Completion/Zsh/Function/__arguments b/Completion/Zsh/Function/__arguments new file mode 100644 index 000000000..af7710971 --- /dev/null +++ b/Completion/Zsh/Function/__arguments @@ -0,0 +1,44 @@ +#compdef _arguments + +# Dear reader: This function is called "__arguments" and is the completion +# function for the completion function _arguments. This function, however, is +# not the completion function _arguments. If you're looking for the function +# _arguments, then you've come to the wrong place. +# +# _arguments is a completion utility function. It is called by completion +# functions for command-line tools. +# +# __arguments is a completion function for _arguments. It runs when one does +# `_arguments -<TAB>' at the shell prompt to jog one's memory about _arguments' +# option flags. +# +# _arguments is in documented in the manual. If you were looking for its +# source code, that'd be either in ../../../Completion/Base/Utility/_arguments +# or in ./_arguments, depending on where you're reading this file. +# +# __arguments takes no arguments. + +if (( ${words[(i)--]} < CURRENT )); then + # "Deriving spec forms from the help output" + _arguments : \ + '*-i[specify option name exclude patterns]:option name exclude pattern' \ + '*-s[specify option aliases]:pattern and replacement as "(this that)"' \ + '*:helpspec (pattern\:message\:action)' +else + _arguments -A '-([AMO]*|[0CRSWnsw])' : \ + '!-n[set $NORMARG]' \ + '-s[enable single-letter option stacking (-x -y == -xy)]' \ + '-w[(rarely needed) enable single-letter option stacking with arguments (-x X -y == -xy X)]' \ + '-W[(rarely needed) enable single-letter option stacking with arguments in the same word (-x X -y == -xXy)]' \ + "-C[modify \$curcontext for \`->action' (instead of \$context)]" \ + "-R[when \`->action' matches, return 300]" \ + "-S[honour \`--' as end-of-options guard]" \ + "-A[do not complete options after non-options]:pattern matching unknown options (e.g., '-*')" \ + '-O[pass elements of array variable to function calls in actions]:array variable name:_parameters -g array' \ + "-M[specify matchspec for completing option names and values]:matchspec for completing option names and values [ 'r\\:|[_-]=* r\\:|=*' ]" \ + '-0[have ${(v)opt_args} be NUL-joined rather than colon-escaped and colon-joined]' \ + "--[derive optspecs from \`\${command} --help' output]" \ + '1::optional delimiter:(\:)' \ + '*:spec (e.g., "(-t --to)"*{-t+,--to=}"[specify recipient]\:recipient'\''s address\:_email_addresses)' + # TODO: doesn't support "Specifying Multiple Sets of Arguments" +fi |