summaryrefslogtreecommitdiffstats
path: root/bash-completion/setterm
diff options
context:
space:
mode:
authorSami Kerola2014-05-18 13:37:24 +0200
committerSami Kerola2014-05-19 23:54:17 +0200
commit253e5e7161e2fb66c65204f91ceaaf8268a42777 (patch)
tree920c6ff345d4afef69369111e59a1948298a2c54 /bash-completion/setterm
parentsetterm: make -msglevel 0 to work as is did earlier (diff)
downloadkernel-qcow2-util-linux-253e5e7161e2fb66c65204f91ceaaf8268a42777.tar.gz
kernel-qcow2-util-linux-253e5e7161e2fb66c65204f91ceaaf8268a42777.tar.xz
kernel-qcow2-util-linux-253e5e7161e2fb66c65204f91ceaaf8268a42777.zip
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 <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion/setterm')
-rw-r--r--bash-completion/setterm15
1 files changed, 12 insertions, 3 deletions
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')