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/_rtcwake | |
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/_rtcwake')
-rw-r--r-- | completions/_rtcwake | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/completions/_rtcwake b/completions/_rtcwake index 4ca452d..535079e 100644 --- a/completions/_rtcwake +++ b/completions/_rtcwake @@ -3,30 +3,30 @@ # Use of this file is deprecated. Upstream completion is available in # util-linux >= 2.23, use that instead. -_rtcwake() +_comp_cmd_rtcwake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | -h | --version | -V | --seconds | -s | --time | -t) return ;; --mode | -m) - COMPREPLY=($(compgen -W 'standby mem disk on no off' -- "$cur")) + _comp_compgen -- -W 'standby mem disk on no off' return ;; --device | -d) - COMPREPLY=($(command ls -d /dev/rtc?* 2>/dev/null)) - COMPREPLY=($(compgen -W '${COMPREPLY[@]#/dev/}' -- "$cur")) + _comp_expand_glob COMPREPLY '/dev/rtc?*' && + _comp_compgen -- -W '"${COMPREPLY[@]#/dev/}"' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help } && - complete -F _rtcwake rtcwake + complete -F _comp_cmd_rtcwake rtcwake # ex: filetype=sh |