mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Improve completion for python -m flag
This commit is contained in:
parent
299a383d98
commit
bc7eb39781
3 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ complete -c python -s d --description "Debug on"
|
||||||
complete -c python -s E --description "Ignore environment variables"
|
complete -c python -s E --description "Ignore environment variables"
|
||||||
complete -c python -s h -l help --description "Display help and exit"
|
complete -c python -s h -l help --description "Display help and exit"
|
||||||
complete -c python -s i --description "Interactive mode after executing commands"
|
complete -c python -s i --description "Interactive mode after executing commands"
|
||||||
complete -c python -s m -d 'Run library module as a script (terminates option list)' -xa "( find /usr/lib/(eval python -V 2>| sed 's/ //; s/\..\$//; s/P/p/') \$PYTHONPATH -maxdepth 1 -name '*.py' -printf '%f\n' | sed 's/.py//')"
|
complete -c python -s m -d 'Run library module as a script (terminates option list)' -xa '(python -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
|
||||||
complete -c python -s O --description "Enable optimizations"
|
complete -c python -s O --description "Enable optimizations"
|
||||||
complete -c python -o OO --description "Remove doc-strings in addition to the -O optimizations"
|
complete -c python -o OO --description "Remove doc-strings in addition to the -O optimizations"
|
||||||
complete -c python -s s --description 'Don\'t add user site directory to sys.path'
|
complete -c python -s s --description 'Don\'t add user site directory to sys.path'
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
complete -c python2 -w python
|
complete -c python2 -w python
|
||||||
# Override this to use python2 instead of python
|
# Override this to use python2 instead of python
|
||||||
complete -c python2 -s m -d 'Run library module as a script (terminates option list)' -xa "( find /usr/lib/(eval python2 -V 2>| sed 's/ //; s/\..\$//; s/P/p/') \$PYTHONPATH -maxdepth 1 -name '*.py' -printf '%f\n' | sed 's/.py//')"
|
complete -c python2 -s m -d 'Run library module as a script (terminates option list)' -xa '(python2 -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
complete -c python3 -w python
|
complete -c python3 -w python
|
||||||
# Override this to use python2 instead of python
|
# Override this to use python2 instead of python
|
||||||
complete -c python3 -s m -d 'Run library module as a script (terminates option list)' -xa "( find /usr/lib/(eval python3 -V 2>| sed 's/ //; s/\..\$//; s/P/p/') \$PYTHONPATH -maxdepth 1 -name '*.py' -printf '%f\n' | sed 's/.py//')"
|
complete -c python3 -s m -d 'Run library module as a script (terminates option list)' -xa '(python3 -c "import pkgutil; print(\'\n\'.join([p[1] for p in pkgutil.iter_modules()]))")'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue