[Bash-completion-devel] [bash-completion-Bugs][313753] Tilde expansion doesn't always work for account name substrings

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Wed Sep 5 13:39:26 UTC 2012


bash-completion-Bugs item #313753, was changed at 2012-09-05 17:39 by Igor Murzov
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313753&group_id=100114

Status: Open
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Tilde expansion doesn't always work for account name substrings 
Distribution: Debian
Originally reported in: None
Milestone: 1.1
Status: None
Original bug number: 


Initial Comment:
If there is a user 'foo' on the server, based on behavior without Bash Completion installed I would expect that typing "ls ~fo<TAB>" would complete that to "/home/foo/".  Some more complicated commands do work as I'd expect.  For example, "vi ~fo<TAB>" turns into "vi /home/foo/".  But it doesn't seem to work on simpler commands like ls or mv.

In those cases _expand_tilde_by_ref is being called, and I'd expect the following additional line in your "Example output" for that function to be handled:

   ~fo       /home/foo/

It doesn't do that though.  This code block executes in that case:

            # No, $1 doesn't contain slash
            eval $1="${!1}"

But that doesn't fill in a partially typed account name.  That seems to be a regression from bash without your package installed to me.


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

>Comment By: Igor Murzov (garik-guest)
Date: 2012-09-05 17:39

Message:
> I would expect that typing "ls ~fo<TAB>" would complete that to "/home/foo/"

`ls ~fo` gives `ls ~foo/` for me; and the same goes for `mv`.

What version of bash-completion you are using? 

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

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



More information about the Bash-completion-devel mailing list