[Bash-completion-devel] [bash-completion-Bugs][311702] _get_cword ignores optional arg, scp host:path completion broken with bash 4

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Wed May 27 17:11:26 UTC 2009


Bugs item #311702, was changed at 27/05/2009 18:47 by David Paleino
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311702&group_id=100114

Status: Open
Priority: 3
Submitted By: Ville Skyttä  (scop-guest)
Assigned to: David Paleino (hanska-guest)
Summary: _get_cword ignores optional arg, scp host:path completion broken with bash 4 
Distribution: None
Originally reported in: Fedora / Red Hat Bugzilla
Milestone: None
Status: None
Original bug number: 502745


Initial Comment:
http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=f6497298a4422ac236cfd10ddc05b3ace3961a27

This commit changes _get_cword so that it no longer does what it is documented to do; the optional argument (see comments in code) is ignored by the new implementation.  The commit message "fixed _get_cword()" does not tell much what was wrong with the original version and since it was pretty much completely rewritten it's hard to guess; David, do you remember any details?  Was ignoring the optional argument an oversight?

Current _get_cword does not play nice with scp completion and bash 4 - some splitting occurs after the colon in hostname:path causing path gets completed locally.  I do not observe this problem with bash 3.2.
https://bugzilla.redhat.com/show_bug.cgi?id=502745#c2

If I revert _get_cword to what it was before this commit, it appears to do the right thing with scp completion and bash 4 (can only partially test at the moment, no real scp available in my limited bash 4 test env, and I haven't tested the reverted version with bash 3.x).

----------------------------------------------------------------------

>Comment By: David Paleino (hanska-guest)
Date: 27/05/2009 19:11

Message:
Hello Ville,
no, I can't really remember what was wrong with the old implementation of _get_cword.

Maybe the reverted version didn't play nice with 3.x? I'm currently unable to do any commit (not posting from my computer) :(

Sorry,
David

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311702&group_id=100114



More information about the Bash-completion-devel mailing list