-
-
Save kashewnuts/e3146c00223ab16af431e4b149569ed8 to your computer and use it in GitHub Desktop.
Ubuntu18.04LTSの/usr/share/bash-completion/completions/toxで補完が効かないので修正したcompletionsファイル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tox completion -*- shell-script -*- | |
_tox() | |
{ | |
local cur prev words cword split | |
_init_completion -s || return | |
case $prev in | |
-h|--help|--version|-n|--num|-i|--index-url|--hashseed|--force-dep) | |
return | |
;; | |
-c) | |
_filedir ini | |
return | |
;; | |
--installpkg|--result-json|--workdir) | |
_filedir | |
return | |
;; | |
-e) | |
local envs=$( "$1" --listenvs-all 2>/dev/null ) | |
local prefix=""; [[ $cur == *,* ]] && prefix="${cur%,*}," | |
COMPREPLY=( $( compgen -W "$envs ALL" -- "${cur##*,}" ) ) | |
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} ) | |
return | |
;; | |
esac | |
$split && return | |
if [[ $cur == -* ]]; then | |
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) | |
[[ $COMPREPLY == *= ]] && compopt -o nospace | |
return | |
fi | |
_filedir py | |
} && | |
complete -F _tox tox | |
# ex: filetype=sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment