|
From: | Eric Blake |
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 18:34:00 -0700 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----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`" 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 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-----
[Prev in Thread] | Current Thread | [Next in Thread] |