diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2013-02-02 19:49:19 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2013-02-02 19:49:19 +0200 |
commit | 1e6a79196cc4942d24ff78d7955e4c295786e883 (patch) | |
tree | fb328b2c414ff57dfe0f4ba668ba4c4ec904ed5d | |
parent | 225b395b494d8c4f2167429cc58256e5898d1d14 (diff) | |
download | bash-completion-1e6a79196cc4942d24ff78d7955e4c295786e883.tar.gz |
xrandr --mode: Clean up one awk call.
-rw-r--r-- | completions/xrandr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/completions/xrandr b/completions/xrandr index 643b11f5..5ce85f7e 100644 --- a/completions/xrandr +++ b/completions/xrandr @@ -21,7 +21,8 @@ _xrandr() done if [[ $output ]]; then local modes=$( xrandr | sed -e "1,/$output/ d" \ - -e "/connected/,$ d" | awk '{print $1}' ) + -e "/connected/,$ d" \ + -e "s/\([^[:space:]]\)[[:space:]].*/\1/" ) COMPREPLY=( $( compgen -W "$modes" -- "$cur" ) ) fi return |