tab completion on link

bridged with qdn.public.qnxrtp.os
Post Reply
Alain Bonnefoy

tab completion on link

Post by Alain Bonnefoy » Thu Dec 11, 2003 8:15 am

Hi,
I made a 'ln -s /net/server/home /home' on a target.
in bash, hitting TAB after '/h', just give '/home', I need a second TAB
to get '/home/' which is not the case on a real '/home'.

Do you know why?

Alain.

David Gibbs

Re: tab completion on link

Post by David Gibbs » Thu Dec 11, 2003 5:00 pm

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:
Hi,
I made a 'ln -s /net/server/home /home' on a target.
in bash, hitting TAB after '/h', just give '/home', I need a second TAB
to get '/home/' which is not the case on a real '/home'.
Did you try the same thing on other OSes? I'd expect the same
behaviour.
Do you know why?
Because a symlink is not a directory. If you do an "ls -F /", ls
will show it as "home@" because it is a symlink, not "home/" because
it isn't a directory.

So, I'd expect bash evaluates the file type, finds it a symlink,
and doesn't put the / on it, then when you hit tab again, it
follows the symlink to find a directory on the other side.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Post Reply

Return to “qdn.public.qnxrtp.os”