[Bash-completion-commits] [bash-completion] 01/02: xrandr: Add (some) --setprovider* arg completion support

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 c50313c30df5eb3a7956b0420f882508e79da0a5
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Apr 3 10:42:22 2014 +0300

    xrandr: Add (some) --setprovider* arg completion support
---
 completions/xrandr | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/completions/xrandr b/completions/xrandr
index cef0941..fed41fd 100644
--- a/completions/xrandr
+++ b/completions/xrandr
@@ -45,6 +45,13 @@ _xrandr()
             COMPREPLY=( $( compgen -W 'normal inverted left right' -- "$cur" ) )
             return
             ;;
+        --setprovideroutputsource|--setprovideroffloadsink)
+            local providers=$( "$1" --listproviders 2>/dev/null |
+                sed -ne 's/.* name:\([^ ]*\).*/\1/p' )
+            COMPREPLY=( $( compgen -W "$providers" -- "$cur" ) )
+            # TODO 2nd arg needed, is that a provider as well?
+            return
+            ;;
     esac
 
     COMPREPLY=( $( compgen -W '$( "$1" -help 2>&1 |

-- 
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