Install python completion for python2 and python3 too.
This commit is contained in:
parent
7df38d3c5d
commit
d1be965eee
4
CHANGES
4
CHANGES
@ -15,8 +15,8 @@ bash-completion (2.x)
|
|||||||
*.awb, and *.iso (Alioth: #311420) to mplayer filename completions.
|
*.awb, and *.iso (Alioth: #311420) to mplayer filename completions.
|
||||||
* Add "short" tarball extensions to unxz, unlzma etc completions.
|
* Add "short" tarball extensions to unxz, unlzma etc completions.
|
||||||
* Improve /etc/init.d/*, ipmitool, jar, javadoc, man, mencoder, mkdir,
|
* Improve /etc/init.d/*, ipmitool, jar, javadoc, man, mencoder, mkdir,
|
||||||
mplayer, povray, rpmbuild, sqlite3, tar, wodim, and general help parsing
|
mplayer, povray, python, rpmbuild, sqlite3, tar, wodim, and general help
|
||||||
completions.
|
parsing completions.
|
||||||
* Fix p4 and povray completions (Alioth: #312625).
|
* Fix p4 and povray completions (Alioth: #312625).
|
||||||
* Add *.xsd, *.xsl, *.rng, and *.wsdl to xmllint filename completions.
|
* Add *.xsd, *.xsl, *.rng, and *.wsdl to xmllint filename completions.
|
||||||
* Recognize rpm query mode based on the --file, --group, --package, and
|
* Recognize rpm query mode based on the --file, --group, --package, and
|
||||||
|
@ -22,7 +22,7 @@ _python()
|
|||||||
_filedir '@(py|pyc|pyo)'
|
_filedir '@(py|pyc|pyo)'
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
!(python|-?))
|
!(python?([23])|-?))
|
||||||
[[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir
|
[[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -45,7 +45,7 @@ _python()
|
|||||||
|
|
||||||
return 0
|
return 0
|
||||||
} &&
|
} &&
|
||||||
complete -F _python python
|
complete -F _python python python2 python3
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
|
Loading…
x
Reference in New Issue
Block a user