diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-01-05 21:48:36 -0500 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-01-05 21:50:44 -0500 |
commit | 7db1680edde374b7de32daeb32e8b801979e2786 (patch) | |
tree | 8a899eda4fed9b82ea267b7253cb0ebce2d839e5 /bash-completion | |
parent | 23465d5a312f86d989ec647522bd3151554a79e4 (diff) | |
download | mirror-ponymix-7db1680edde374b7de32daeb32e8b801979e2786.tar.gz mirror-ponymix-7db1680edde374b7de32daeb32e8b801979e2786.tar.bz2 mirror-ponymix-7db1680edde374b7de32daeb32e8b801979e2786.zip |
bash-completion: detect devtype via -t
Diffstat (limited to 'bash-completion')
-rw-r--r-- | bash-completion | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bash-completion b/bash-completion index 2bcce1d..b9388c4 100644 --- a/bash-completion +++ b/bash-completion @@ -29,7 +29,7 @@ _ponymix() { fi case $word in - --devtype) + --devtype|-t) # look ahead to next word if [[ ${COMP_WORDS[i+1]} ]]; then devtype=${COMP_WORDS[i+1]} @@ -38,6 +38,9 @@ _ponymix() { --devtype=*) devtype=${word#--devtype=} ;; + -t*) + devtype=${word#-t} + ;; --sink|--output) devtype=sink ;; @@ -53,9 +56,9 @@ _ponymix() { case $prev in --card|-c) - mapfile -t devices < <(\ponymix list-cards-short 2>/dev/null) + mapfile -t cards < <(\ponymix list-cards-short 2>/dev/null) local IFS=$'\n' - COMPREPLY=($(compgen -W '$(printf "%s\n" "${devices[@]//\ /\\ }")' -- "$cur")) + COMPREPLY=($(compgen -W '$(printf "%s\n" "${cards[@]//\ /\\ }")' -- "$cur")) ;; --device|-d) while IFS=$'\t' read _ dev idx _; do |