diff options
author | Oliver Kiddle <opk@zsh.org> | 2021-11-24 23:07:18 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2021-11-24 23:09:38 +0100 |
commit | 16d5d6a9dae526355caf16f2de9d57d84b5d9993 (patch) | |
tree | 6ab30a2ad2596523b85aa553ffa8a4544632fd7a /Completion/Unix/Command/_stdbuf | |
parent | 138f5bf144589a59ef009f26332652291cd0a944 (diff) | |
download | zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.gz zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.xz zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.zip |
49597: add a helper for completing numbers with unit suffixes and separate out defaults, ranges and units in completion descriptions
Diffstat (limited to 'Completion/Unix/Command/_stdbuf')
-rw-r--r-- | Completion/Unix/Command/_stdbuf | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_stdbuf b/Completion/Unix/Command/_stdbuf index a18938ee1..4b7d98ba0 100644 --- a/Completion/Unix/Command/_stdbuf +++ b/Completion/Unix/Command/_stdbuf @@ -7,7 +7,9 @@ short=( -e -i -o ) long=( --error --input --output ) buf=( err in out ) -opt='[set initial buffering for std${buf[i]}]:mode or size:((0\:unbuffered L\:line\ buffered' +opt='[set initial buffering for std${buf[i]}]: : _alternative + "sizes\: \: _numbers -u bytes size k M G" + "modes\:mode\:((0\:unbuffered L\:line\ buffered' if _pick_variant gnu=GNU freebsd --version; then gnu=1 args=( @@ -17,7 +19,7 @@ if _pick_variant gnu=GNU freebsd --version; then else opt+=' B\:fully\ buffered' fi -opt+='))' +opt+='))"' for ((i=1;i<=3;i++)); do args+=( "(${long[i]})${short[i]}+${(e)opt}" ) |