diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2013-02-02 20:01:33 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2013-02-02 20:03:41 +0200 |
commit | ae42c9675838fc92a7b77f71c0a4988c8e724822 (patch) | |
tree | c30c7b8b8d2ae153dcc1d27d2ca507c2c4ae23ed | |
parent | 1e6a79196cc4942d24ff78d7955e4c295786e883 (diff) | |
download | bash-completion-ae42c9675838fc92a7b77f71c0a4988c8e724822.tar.gz |
xrandr: Use _parse_help.
-rw-r--r-- | completions/xrandr | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/completions/xrandr b/completions/xrandr index 5ce85f7e..d17fb29f 100644 --- a/completions/xrandr +++ b/completions/xrandr @@ -42,19 +42,8 @@ _xrandr() ;; 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 - ;; - esac + COMPREPLY=( $( compgen -W '$( "$1" -help 2>&1 | + sed -e "s/ or / /g" -e "s/<[^>]*>]//g" | _parse_help - )' -- "$cur" ) ) } && complete -F _xrandr xrandr |