From 1e6a79196cc4942d24ff78d7955e4c295786e883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 2 Feb 2013 19:49:19 +0200 Subject: [PATCH] xrandr --mode: Clean up one awk call. --- completions/xrandr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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