LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Configure symbolic links to always append a slash (https://www.linuxquestions.org/questions/linux-general-1/configure-symbolic-links-to-always-append-a-slash-496851/)

sadarax 10-30-2006 04:30 AM

Configure symbolic links to always append a slash
 
I have forgot what conf file I need to edit to make symbolic links always append a trailing slash when I am using them from command line. Can anyone help? I am using Ubuntu Dapper.

jschiwal 10-30-2006 04:41 AM

Is this what you are refering to, from "info coreutils"
Quote:

File: coreutils.info, Node: Trailing slashes, Next: Traversing symlinks, Prev: Target directory, Up: Common options

2.5 Trailing slashes
====================

Some GNU programs (at least `cp' and `mv') allow you to remove any
trailing slashes from each SOURCE argument before operating on it. The
`--strip-trailing-slashes' option enables this behavior.

This is useful when a SOURCE argument may have a trailing slash and
specify a symbolic link to a directory. This scenario is in fact rather
common because some shells can automatically append a trailing slash
when performing file name completion on such symbolic links. Without
this option, `mv', for example, (via the system's rename function) must
interpret a trailing slash as a request to dereference the symbolic link
and so must rename the indirectly referenced _directory_ and not the
symbolic link. Although it may seem surprising that such behavior be
the default, it is required by POSIX and is consistent with other parts
of that standard.

sadarax 10-30-2006 04:58 AM

The only real reason I want an appended slash is for the 'cd' command in consoles. I could swear I edited a conf file in /etc/ last time I did this.

Tnfo coreutils does not seem to have the information I want.

Zerthis 10-30-2006 05:40 AM

Edit /etc/inputrc and add the following line:

set mark-symlinked-directories on

This will help you :)

Just in case: you have to restart your terminal in order for it to work.


All times are GMT -5. The time now is 04:57 PM.