bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make the colors different for a symbol link pointing to a fil


From: Peng Yu
Subject: Re: How to make the colors different for a symbol link pointing to a file and symbol link pointing to a dir?
Date: Wed, 30 Dec 2009 20:30:32 -0600

On Wed, Dec 30, 2009 at 7:34 PM, Eric Blake <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Peng Yu on 12/30/2009 4:09 PM:
>> alias dir='ls --color=auto --format=vertical'
>>
>> The above alias doesn't distinguish the color for a symbol link
>> pointing to a file and a symbol link pointing to a dir. I'm wondering
>> if there is a way to configure it to do so?
>
> Use dircolors (as in adding the line:
>
> eval "`dircolors path/to/preferences`"

http://linux.die.net/man/5/dir_colors

According to the above page, can I put the line 'LINK target' in
~/.dir_colors without calling eval "`dircolors path/to/preferences`"
in the profile?

> in your login scripts) to change the settings used by ls --color=auto.  In
> this case, your version of path/to/preferences should contain the setting of:
>
> LINK target

I don't want the color of the link the same as the color of the
target. I want the color of the link that points to a file different
from the color of the link that points to a dir. I still want to tell
that they are links, so I can not use the same color as their targets.

> rather than the default of LINK 01;36.  That will then tell ls to color
> symlinks according to what they point to.
>
> - --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake             address@hidden
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAks7/4gACgkQ84KuGfSFAYCSfQCePklqXlQDdC2QXKt+8V9HQHYJ
> plYAoIG1B3PG17HgA7AzSDUkZLVzAOol
> =EsgA
> -----END PGP SIGNATURE-----
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]