[Bash-completion-commits] [bash-completion] 02/02: xrandr: Use the invoked command internally, not hardcoded "xrandr"

Ville Skyttä scop-guest at moszumanska.debian.org
Thu Apr 3 07:44:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit b758afc105fd0656c13f88a5bd2f73bac81399db
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Apr 3 10:43:18 2014 +0300

    xrandr: Use the invoked command internally, not hardcoded "xrandr"
---
 completions/xrandr | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/completions/xrandr b/completions/xrandr
index fed41fd..7a4edaf 100644
--- a/completions/xrandr
+++ b/completions/xrandr
@@ -12,7 +12,7 @@ _xrandr()
             return
             ;;
         --output|--left-of|--right-of|--above|--below|--same-as)
-            local outputs=$( xrandr | awk '/connected/ {print $1}' )
+            local outputs=$( "$1" | awk '/connected/ {print $1}' )
             COMPREPLY=( $( compgen -W "$outputs" -- "$cur" ) )
             return
             ;;
@@ -25,7 +25,7 @@ _xrandr()
                 fi
             done
             if [[ $output ]]; then
-                local modes=$( xrandr | sed -e "1,/$output/ d" \
+                local modes=$( "$1" | sed -e "1,/$output/ d" \
                     -e "/connected/,$ d" \
                     -e "s/\([^[:space:]]\)[[:space:]].*/\1/" )
                 COMPREPLY=( $( compgen -W "$modes" -- "$cur" ) )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list