From 253e5e7161e2fb66c65204f91ceaaf8268a42777 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 18 May 2014 12:37:24 +0100 Subject: setterm: correct usage() bright color argument This has been wrong since commit 2dc8716. The bright is a prefix attribute to other colors. Signed-off-by: Sami Kerola --- bash-completion/setterm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'bash-completion/setterm') diff --git a/bash-completion/setterm b/bash-completion/setterm index 6ddc2c61b..dd46472de 100644 --- a/bash-completion/setterm +++ b/bash-completion/setterm @@ -1,6 +1,6 @@ _setterm_module() { - local cur prev OPTS + local bright cur prev OPTS COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" @@ -14,8 +14,17 @@ _setterm_module() COMPREPLY=( $(compgen -W "$TERM_LIST" -- $cur) ) return 0 ;; - '--foreground'|'--background'|'--ulcolor'|'--hbcolor') - COMPREPLY=( $(compgen -W "default black blue cyan green magenta red white yellow" -- $cur) ) + '--foreground'|'--background') + COMPREPLY=( $(compgen -W "black blue cyan default green magenta red white yellow" -- $cur) ) + return 0 + ;; + '--ulcolor'|'--hbcolor'|'bright') + if [ $prev != 'bright' ]; then + bright='bright black grey' + else + bright='' + fi + COMPREPLY=( $(compgen -W "$bright blue cyan green magenta red white yellow" -- $cur) ) return 0 ;; '--cursor'|'--repeat'|'--appcursorkeys'|'--linewrap'|'--inversescreen'|'--bold'|'--half-bright'|'--blink'|'--reverse'|'--underline'|'--msg') -- cgit v1.2.3-55-g7522