From: Sami Kerola Date: Fri, 3 Jul 2015 18:03:08 +0000 (+0100) Subject: bash-completion: cal: add --twelve and --color options X-Git-Tag: v2.27-rc1~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe63e9032dd2984b6e8365ab6097541f5ffdc071;p=thirdparty%2Futil-linux.git bash-completion: cal: add --twelve and --color options Signed-off-by: Sami Kerola --- diff --git a/bash-completion/cal b/bash-completion/cal index 1510eb1fab..3b65e8e430 100644 --- a/bash-completion/cal +++ b/bash-completion/cal @@ -3,15 +3,22 @@ _cal_module() local cur prev OPTS COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - case $prev in - '-h'|'--help'|'-V'|'--version') - return 0 - ;; - esac case $cur in -*) - OPTS="--one --three --sunday --monday --julian --year --week --version --help" + OPTS=" --one + --three + --months + --sunday + --monday + --julian + --year + --twelve + --week + --color=auto + --color=always + --color=never + --version + --help" COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) return 0 ;;