[opensuse] Re: 11.4 - Where did the trailing '/' go in bash-completion for ls??
![](https://seccdn.libravatar.org/avatar/9b3c3a790b500cdb2bbfe34f8db0e867.jpg?s=120&d=mm&r=g)
David C. Rankin wrote:
Guys,
What is wrong with the 'tab' to complete directory names in bash? eg:
ls Docu<tab>
gives:
Documents
but not
Documents/
Err.. Is this a bug or a feature. 11.3 was normal, so I don't know what's up with 11.4...
I've experienced similar behaviour in several environments, at least as early as 11.1. Also in Ubuntu 9.04 IIRC. Rename /etc/bash_completion und /etc/bash_completion.d, start a new bash --login, and see if it stills happen. If not, it's the same behaviour as in my case -- but I can't tell you which completion rule triggers it. HTH, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/247f3737bfdd07c80a5411399e9a504c.jpg?s=120&d=mm&r=g)
David C. Rankin wrote:
Guys,
What is wrong with the 'tab' to complete directory names in bash? eg:
OK, I've just noticed it again and a quick bit of experimentation has determined the cause, at least on my systems. FWIW, the system where I noticed it was Ubuntu 10.04 but I also see the same behaviour on opensuse 11.2 now I know what to look for. And the answer is ... symlinks. If the directory isn't really a directory but is a symlink to a directory then TAB lists just the name and a second TAB adds the trailing slash. For ordinary directories, a single TAB gets the slash. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/27aacf61a13c66fcc083fcf8a84823bc.jpg?s=120&d=mm&r=g)
On 03/24/2011 08:34 AM, Dave Howorth wrote:
David C. Rankin wrote:
Guys,
What is wrong with the 'tab' to complete directory names in bash? eg:
OK, I've just noticed it again and a quick bit of experimentation has determined the cause, at least on my systems.
FWIW, the system where I noticed it was Ubuntu 10.04 but I also see the same behaviour on opensuse 11.2 now I know what to look for.
And the answer is ...
symlinks.
If the directory isn't really a directory but is a symlink to a directory then TAB lists just the name and a second TAB adds the trailing slash. For ordinary directories, a single TAB gets the slash.
Cheers, Dave
I could live with the symlink behavior, but what I'm seeing occurs on just plain old directories. I have a 'tde' directory in /home/david: 21:27 alchemy:~/tde> l total 56 drwxr-xr-x 14 david david 4096 Mar 17 10:44 . drwxr-xr-x 55 david david 4096 Mar 24 21:22 .. drwxr-xr-x 4 david david 4096 Mar 24 17:06 arch drwxr-xr-x 2 david david 4096 Feb 27 14:33 cfg drwxr-xr-x 3 david david 4096 Feb 7 09:57 etc drwxr-xr-x 4 david david 4096 Mar 5 16:07 flist drwxr-xr-x 9 david david 4096 Mar 16 11:33 patch drwxr-xr-x 20 david david 4096 Mar 12 18:36 pbpkg drwxr-xr-x 6 david david 4096 Mar 5 13:44 pkgbuild drwxr-xr-x 2 david david 4096 Mar 16 13:37 scr drwxr-xr-x 2 david david 4096 Mar 17 00:35 src drwxr-xr-x 10 david david 4096 Mar 16 20:35 tnotes drwxr-xr-x 5 david david 4096 Mar 12 22:43 tpkg drwxr-xr-x 27 david david 4096 Mar 4 21:45 trinity if I change into the tde/tnotes directory for example and then try to cd to ~/tde, I get a really strange '//' on the second tab press: 21:27 alchemy:~/tde> cd tnotes/ 21:27 alchemy:~/tde/tnotes> cd ~/tde tde/ tde// What is up with the 'tde//' and why don't I get the trailing slash on the first 'tab' press with tab completion. 'tde' is the only 'td*' I have in ~/. 21:33 alchemy:~> ls apps arch bin cnf Desktop dev doc Downloads img mmedia public_html scr suse tblds tde tmp Weird behavior... -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Dave Howorth
-
David C. Rankin
-
Joachim Schrod