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 | f4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch) | |
tree | b62d60873864065d6428a84a119dd8a3c90f1397 /completions/crontab | |
parent | Adding upstream version 1:2.11. (diff) | |
download | bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip |
Adding upstream version 1:2.12.0.upstream/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 |