summaryrefslogtreecommitdiff
path: root/completions/tox
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.net.br>2019-08-07 09:17:13 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.net.br>2019-08-07 09:17:13 -0300
commit5732da2af736c40cf693354485446ab4867ecb4d (patch)
tree76d76cdfa16ca62d20fb109da13895ec64fff110 /completions/tox
parent9cd22d1df8f0f5b554858471c86faa9f37b8fed4 (diff)
downloadbash-completion-5732da2af736c40cf693354485446ab4867ecb4d.tar.gz
New upstream version 2.9upstream/2.9
Diffstat (limited to 'completions/tox')
-rw-r--r--completions/tox15
1 files changed, 9 insertions, 6 deletions
diff --git a/completions/tox b/completions/tox
index 5812fcbf..a6418aca 100644
--- a/completions/tox
+++ b/completions/tox
@@ -6,10 +6,10 @@ _tox()
_init_completion || return
case $prev in
- -h|--help|--version|-n|--num|-i|--index-url|--hashseed|--force-dep)
+ --help|--version|--num|--index-url|--hashseed|--force-dep|-!(-*)[hni])
return
;;
- -c)
+ -!(-*)c)
_filedir ini
return
;;
@@ -17,18 +17,21 @@ _tox()
_filedir
return
;;
- -e)
- local envs=$( "$1" --listenvs-all 2>/dev/null )
+ -!(-*)e)
+ local envs=$(
+ { "$1" --listenvs-all || "$1" --listenvs; } 2>/dev/null )
local prefix=""; [[ $cur == *,* ]] && prefix="${cur%,*},"
- COMPREPLY=( $( compgen -W "$envs ALL" -- "${cur##*,}" ) )
+ COMPREPLY=( $(compgen -W "$envs ALL" -- "${cur##*,}") )
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
return
fi
} &&
complete -F _tox tox
+
+# ex: filetype=sh