[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-111-gf1100ef
Ville Skyttä
ville.skytta at iki.fi
Sat Feb 2 09:36:15 UTC 2013
The following commit has been merged in the master branch:
commit 44f1065ada14dda97d3c0417b120207d460e0be0
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Feb 2 10:51:42 2013 +0200
pydoc: Complete on keywords and topics.
diff --git a/completions/pydoc b/completions/pydoc
index 16adb86..2783d17 100644
--- a/completions/pydoc
+++ b/completions/pydoc
@@ -23,8 +23,15 @@ _pydoc()
fi
COMPREPLY=( $( compgen -W 'keywords topics modules' -- "$cur" ) )
+
local python=python; [[ $1 == *3* ]] && python=python3
_xfunc python _python_modules $python
+
+ # Note that we don't do "pydoc modules" as it is known to hang on
+ # some systems; _python_modules tends to work better and faster.
+ COMPREPLY+=( $( compgen -W \
+ '$( $1 keywords topics | sed -e /^Here/d )' -- "$cur" ) )
+
_filedir py
} &&
complete -F _pydoc pydoc pydoc3
--
bash-completion
More information about the Bash-completion-commits
mailing list