diff options
author | David Paleino <dapal@debian.org> | 2012-01-08 00:19:18 +0100 |
---|---|---|
committer | David Paleino <dapal@debian.org> | 2012-01-08 00:19:18 +0100 |
commit | c3d398fcc6e400be546c28eb1fc25abfa5816eac (patch) | |
tree | 3266a00f1037eb5522f1f8bf1a73e443ab2c26c4 /completions/xgamma | |
parent | 2c8171c38d87ddef31c92a76547d3fdf773a1337 (diff) | |
download | bash-completion-c3d398fcc6e400be546c28eb1fc25abfa5816eac.tar.gz |
Imported Upstream version 1.99upstream/1.99
Diffstat (limited to 'completions/xgamma')
-rw-r--r-- | completions/xgamma | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/completions/xgamma b/completions/xgamma index 4c434cfe..c5b8a76b 100644 --- a/completions/xgamma +++ b/completions/xgamma @@ -7,9 +7,9 @@ _xgamma() case "$prev" in -screen) - local screens=$(xrandr --query 2>/dev/null | \ - sed -n '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null) - COMPREPLY=( $(compgen -W "$screens" -- "$cur")) + local screens=$( xrandr --query 2>/dev/null | sed -n \ + '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null ) + COMPREPLY=( $( compgen -W "$screens" -- "$cur" ) ) return ;; -gamma|-rgamma|-ggamma|-bgamma) @@ -17,7 +17,7 @@ _xgamma() if [[ $cur && "$cur" != *.* ]]; then COMPREPLY=( . ) fi - COMPREPLY+=( $(compgen -W "{0..9}") ) + COMPREPLY+=( $( compgen -W "{0..9}" ) ) compopt -o nospace return ;; @@ -26,14 +26,15 @@ _xgamma() if [[ "$cur" == :* && "$cur" != :*.* ]]; then # FIXME: where to get local display numbers? local display=${cur#:} - COMPREPLY=( $(compgen -W "${display:-0}.") ) + COMPREPLY=( $( compgen -W "${display:-0}." ) ) compopt -o nospace elif [[ "$cur" == :*.* ]]; then # local screen numbers - local t screens=$(xrandr --query 2>/dev/null | sed -n \ - -e '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null) + local t screens=$( xrandr --query 2>/dev/null | sed -ne \ + '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null ) t="${cur#:}" - COMPREPLY=( $(compgen -P "${t%.*}." -W "$screens" -- "${cur##*.}")) + COMPREPLY=( $( compgen -P "${t%.*}." -W "$screens" -- \ + "${cur##*.}" ) ) elif [[ "$cur" != *:* ]]; then # complete hostnames _known_hosts_real -c "$cur" |