1
# bash completion for python
9
_get_comp_words_by_ref cur prev
13
COMPREPLY=( $( compgen -W "old new warn warnall" -- "$cur" ) )
17
COMPREPLY=( $( compgen -W "ignore default all module once error" \
22
_filedir '@(py|pyc|pyo)'
26
[[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir
31
# if '-c' is already given, complete all kind of files.
32
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
33
if [[ ${COMP_WORDS[i]} == -c ]]; then
39
if [[ "$cur" != -* ]]; then
40
_filedir '@(py|pyc|pyo)'
42
COMPREPLY=( $( compgen -W "- -d -E -h -i -O -Q -S -t -u \
43
-U -v -V -W -x -c" -- "$cur" ) )
50
complete -F _python -o filenames python
55
# sh-indent-comment: t
56
# indent-tabs-mode: nil
58
# ex: ts=4 sw=4 et filetype=sh