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/_killall | |
| parent | 49586: fix :a and :A modifiers (with PWD="/") on Cygwin (diff) | |
| download | zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.gz zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.bz2 zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.lz zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.xz zsh-16d5d6a9dae526355caf16f2de9d57d84b5d9993.tar.zst 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/_killall')
| -rw-r--r-- | Completion/Unix/Command/_killall | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Completion/Unix/Command/_killall b/Completion/Unix/Command/_killall index 36accb2e0..3ddd36341 100644 --- a/Completion/Unix/Command/_killall +++ b/Completion/Unix/Command/_killall @@ -38,15 +38,9 @@ if _pick_variant psmisc=PSmisc unix --version; then case $state in (time) - local -a units=( 's:seconds' 'm:minutes' 'h:hours' 'd:days' - 'w:weeks' 'M:months' 'y:years' ) - if compset -P '[0-9]##(|.[0-9]#)'; then - _alternative 'float-numbers:: _message "float number"' \ - 'units:: _describe unit units' && ret=0 - else - _message 'float number and unit' && ret=0 - fi - ;; + _numbers -fN age 's:seconds' 'm:minutes' 'h:hours' 'd:days' \ + 'w:weeks' 'M:months' 'y:years' + ;; esac return ret |
