summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2013-02-02 19:49:19 +0200
committerVille Skyttä <ville.skytta@iki.fi>2013-02-02 19:49:19 +0200
commit1e6a79196cc4942d24ff78d7955e4c295786e883 (patch)
treefb328b2c414ff57dfe0f4ba668ba4c4ec904ed5d
parent225b395b494d8c4f2167429cc58256e5898d1d14 (diff)
downloadbash-completion-1e6a79196cc4942d24ff78d7955e4c295786e883.tar.gz
xrandr --mode: Clean up one awk call.
-rw-r--r--completions/xrandr3
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