diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/crontab | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip |
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/crontab')
-rw-r--r-- | completions/crontab | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/completions/crontab b/completions/crontab index cac7853..4f80347 100644 --- a/completions/crontab +++ b/completions/crontab @@ -1,13 +1,13 @@ # crontab(1) completion -*- shell-script -*- -_crontab() +_comp_cmd_crontab() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*u) - _allowed_users + _comp_compgen_allowed_users return ;; esac @@ -18,31 +18,31 @@ _crontab() local i for i in "${!words[@]}"; do - [[ ${words[i]} && $i -ne $cword ]] && unset "opts[${words[i]}]" + [[ ${words[i]} && $i -ne $cword ]] && unset -v "opts[${words[i]}]" case "${words[i]}" in -l) - unset 'opts[-r]' 'opts[-e]' 'opts[-i]' 'opts[-s]' + unset -v 'opts[-r]' 'opts[-e]' 'opts[-i]' 'opts[-s]' ;; -e) - unset 'opts[-l]' 'opts[-r]' 'opts[-i]' + unset -v 'opts[-l]' 'opts[-r]' 'opts[-i]' ;; -r) - unset 'opts[-l]' 'opts[-e]' + unset -v 'opts[-l]' 'opts[-e]' ;; -u) - unset 'opts[-i]' + unset -v 'opts[-i]' ;; esac done if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '${!opts[@]}' -- "$cur")) + _comp_compgen -- -W '"${!opts[@]}"' return fi # do filenames only if we did not have -l, -r, or -e - [[ ${words[*]} == *\ -[lre]* ]] || _filedir + [[ ${words[*]} == *\ -[lre]* ]] || _comp_compgen_filedir } && - complete -F _crontab crontab + complete -F _comp_cmd_crontab crontab # ex: filetype=sh |