FS#20257 - [bash-completion] bug with python

Attached to Project: Arch Linux
Opened by Hervé (herve) - Thursday, 22 July 2010, 12:59 GMT
Last edited by Eric Belanger (Snowman) - Saturday, 29 January 2011, 04:53 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Aaron Griffin (phrakture)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Python completion works as expected:

$ python <TAB><TAB>

shows only directories and .py files.

But with an absolute path:

$ /usr/bin/python <TAB>

bash: COMP_WORDS: bad array subscript

It doesn't happen with "python2" or whatever instead.

I detected it with a local installation of Python and traced down the problem to be the path.

I know another Arch user who reported me the problem spontaneously.

Should this be reported upstream?

Additional info:
* package version(s)
bash-completion 1.2-1
python 2.6.5-3

* config and/or log files etc.
No hack over the completion files, and just this in my .bashrc:

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
This task depends upon

Closed by  Eric Belanger (Snowman)
Saturday, 29 January 2011, 04:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  Thank you Vladimir for pointing out that it was fixed in git.
Comment by Eric Belanger (Snowman) - Wednesday, 04 August 2010, 19:45 GMT
No. It's a packaging issue. /etc/profile.d/bash_completion.sh should have executable perms. I'll fix it.
Comment by Eric Belanger (Snowman) - Wednesday, 04 August 2010, 20:41 GMT
sourcing /etc/bash_completion doesn't fix the problem here.
Comment by Allan McRae (Allan) - Wednesday, 04 August 2010, 23:12 GMT
It appears to be a bash_completion issue and not a python one so I am removing myself.
Comment by Eric Belanger (Snowman) - Saturday, 16 October 2010, 21:43 GMT
Report it upstream.
Comment by Vladimir (_v_l) - Saturday, 29 January 2011, 00:54 GMT
This works Ok here: Archlinux x86_64, bash: 4.1.9(2), bash-completion from git.

Loading...