[Bash-completion-devel] [bash-completion-Bugs][312959] Bug in Python completion using paths
bash-completion-bugs at alioth.debian.org
bash-completion-bugs at alioth.debian.org
Fri Jan 28 14:49:43 UTC 2011
Bugs item #312959, was opened at 28/01/2011 14:49
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312959&group_id=100114
Status: Open
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Bug in Python completion using paths
Distribution: None
Originally reported in: None
Milestone: None
Status: None
Original bug number:
Initial Comment:
Anonymous message posted by debian at oursours.net
I originally reported this bug to Archlinux: https://bugs.archlinux.org/task/20257
The following change fixes the problem for me while apparently not breaking anything:
--- python.orig 2011-01-28 15:39:38.000000972 +0100
+++ python 2011-01-28 15:32:45.733334505 +0100
@@ -23,7 +23,7 @@
return 0
;;
!(python|-?))
- [[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir
+ [[ ${COMP_WORDS[COMP_CWORD-1]} != -@(Q|W) ]] && _filedir
;;
esac
But don't take my word, I'm just a beginner at completion (I just wrote my first script yesterday).
It still doesn't complete when the command is a path, e.g. "/usr/bin/python". I'm curious how you enable completion for all commands where the basename is "python".
By the way, you should consider enabling this completion for all "versionned" binaries: python2, python2.7, python3, python3.1
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312959&group_id=100114
More information about the Bash-completion-devel
mailing list