summaryrefslogtreecommitdiff
path: root/completions/xrandr
diff options
context:
space:
mode:
authorDavid Paleino <dapal@debian.org>2012-01-08 00:19:18 +0100
committerDavid Paleino <dapal@debian.org>2012-01-08 00:19:18 +0100
commitc3d398fcc6e400be546c28eb1fc25abfa5816eac (patch)
tree3266a00f1037eb5522f1f8bf1a73e443ab2c26c4 /completions/xrandr
parent2c8171c38d87ddef31c92a76547d3fdf773a1337 (diff)
downloadbash-completion-c3d398fcc6e400be546c28eb1fc25abfa5816eac.tar.gz
Imported Upstream version 1.99upstream/1.99
Diffstat (limited to 'completions/xrandr')
-rw-r--r--completions/xrandr48
1 files changed, 23 insertions, 25 deletions
diff --git a/completions/xrandr b/completions/xrandr
index 36164298..332be812 100644
--- a/completions/xrandr
+++ b/completions/xrandr
@@ -7,52 +7,50 @@ _xrandr()
local output modes
- case $prev in
+ case "$prev" in
--output|--left-of|--right-of|--above|--below|--same-as)
- local outputs=$(xrandr|awk '/connected/ {print $1}')
- COMPREPLY=( $(compgen -W "$outputs" -- "$cur"))
- return 0
+ local outputs=$( xrandr | awk '/connected/ {print $1}' )
+ COMPREPLY=( $( compgen -W "$outputs" -- "$cur" ) )
+ return
;;
--mode)
for(( i = 1; i < cword; i++ )); do
- if [[ "${words[i]}" == "--output" ]]; then
+ if [[ "${words[i]}" == --output ]]; then
output=${words[i+1]}
break
fi
done
- modes=$(xrandr|sed -e "1,/$output/ d" \
- -e "/connected/,$ d"|awk '{print $1}')
- COMPREPLY=( $( compgen -W "$modes" -- "$cur"))
- return 0
+ modes=$( xrandr | sed -e "1,/$output/ d" \
+ -e "/connected/,$ d" | awk '{print $1}' )
+ COMPREPLY=( $( compgen -W "$modes" -- "$cur" ) )
+ return
;;
-o|--orientation)
COMPREPLY=( $( compgen -W 'normal inverted left right 0 1 2 3' -- \
"$cur" ) )
- return 0
+ return
;;
--reflect)
- COMPREPLY=( $( compgen -W 'normal x y xy' -- \
- "$cur" ) )
- return 0
+ COMPREPLY=( $( compgen -W 'normal x y xy' -- "$cur" ) )
+ return
;;
--rotate)
- COMPREPLY=( $( compgen -W 'normal inverted left right' -- \
- "$cur" ) )
- return 0
+ COMPREPLY=( $( compgen -W 'normal inverted left right' -- "$cur" ) )
+ return
;;
esac
case $cur in
*)
- COMPREPLY=( $(compgen -W '-display -help --orientation --query \
- --size --rate --version -x -y --screen --verbose --dryrun \
- --q1 --q12 --nograb --prop --properties --fb --fbmm --dpi \
- --output --auto --mode --preferred --pos --rate --refresh \
- --reflect --rotate --left-of --right-of --above --below \
- --same-as --set --scale --transform --off --crtc --panning \
- --gamma --brightness --primary --noprimary --newmode --rmmode \
- --addmode --delmode' -- "$cur") )
- return 0
+ COMPREPLY=( $( compgen -W '-display -help --orientation --query
+ --size --rate --version -x -y --screen --verbose --dryrun
+ --q1 --q12 --nograb --prop --properties --fb --fbmm --dpi
+ --output --auto --mode --preferred --pos --rate --refresh
+ --reflect --rotate --left-of --right-of --above --below
+ --same-as --set --scale --transform --off --crtc --panning
+ --gamma --brightness --primary --noprimary --newmode --rmmode
+ --addmode --delmode' -- "$cur" ) )
+ return
;;
esac
} &&