diff --git a/completions/python b/completions/python index d6274298..17f96f50 100644 --- a/completions/python +++ b/completions/python @@ -21,8 +21,9 @@ _python() -- "$cur" ) ) return 0 ;; - !(python?([23])|-?)) - [[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir + !(?(*/)python*([0-9.])|-?)) + [[ $COMP_CWORD -lt 2 || ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] \ + && _filedir ;; esac