]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: cal: add --twelve and --color options
authorSami Kerola <kerolasa@iki.fi>
Fri, 3 Jul 2015 18:03:08 +0000 (19:03 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 15 Jul 2015 13:51:04 +0000 (15:51 +0200)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
bash-completion/cal

index 1510eb1fabeb2d7ccc13d6520f83a8cca9773a39..3b65e8e430bf30e3019cae5354caaf369fac335c 100644 (file)
@@ -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
                        ;;