Mailinglist Archive: opensuse (1046 mails)

< Previous Next >
Re: [opensuse] Re: 11.4 - Where did the trailing '/' go in bash-completion for ls??
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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >