diff options
Diffstat (limited to 'completions/pylint')
-rw-r--r-- | completions/pylint | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/completions/pylint b/completions/pylint index 0383c7e2..b1d80918 100644 --- a/completions/pylint +++ b/completions/pylint @@ -5,6 +5,8 @@ _pylint() local cur prev words cword split _init_completion -s || return + local python=python; [[ $1 == *3* ]] && python=python3 + case $prev in --version|-h|--help|--long-help|--help-msg|--init-hook|--ignore|-e|\ --enable|-d|--disable|--evaluation|--max-line-length|\ @@ -34,8 +36,8 @@ _pylint() --load-plugins|--deprecated-modules) local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*}," cur="${cur##*,}" - _xfunc python _python_modules - COMPREPLY=( ${COMPREPLY[@]/#/$prefix} ) + _xfunc python _python_modules $python + [[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} ) return ;; -f|--format) @@ -58,9 +60,9 @@ _pylint() return fi - _xfunc python _python_modules + _xfunc python _python_modules $python _filedir py } && -complete -F _pylint pylint +complete -F _pylint pylint pylint-2 pylint-3 # ex: filetype=sh |