aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions/python.fish
diff options
context:
space:
mode:
authorGravatar Joshua Elliott <joshuacelliott@gmail.com>2015-07-30 16:04:39 -0600
committerGravatar Joshua Elliott <joshuacelliott@gmail.com>2015-07-30 16:04:39 -0600
commitbc7eb397818774d5d5bd95f48eaa7508b5808d53 (patch)
tree86186cd0be8cd52c2b4b9d2a7882a0dce6b5eb43 /share/completions/python.fish
parent299a383d98f67fdd8ec5ce91f72b5d560ef4441e (diff)
Improve completion for python -m flag
Diffstat (limited to 'share/completions/python.fish')
-rw-r--r--share/completions/python.fish2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/completions/python.fish b/share/completions/python.fish
index 764478de..64ab4d9b 100644
--- a/share/completions/python.fish
+++ b/share/completions/python.fish
@@ -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 h -l help --description "Display help and exit"
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 -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'