Skip to content

ls does not colorize symlink targets according to the target type #8934

@ehoffman2

Description

@ehoffman2

(Originally taught this was a 'dircolors' issue, but this is a 'ls' issue).

In the GNU version of ls, ls (v8.32, that shipped with Ubuntu 22.10) does colorize symlinks and targets with different colors (depending on target type).

For example:

(cyan)libpng12.so -> (green)libpng12.so.0.54.0
(cyan)libpng12.so.0 -> (green)libpng12.so.0.54.0
(green)libpng12.so.0.54.0

or

(cyan)lib -> (blue)usr/lib
(cyan)lib32 -> (blue)usr/lib32
(cyan)lib64 -> (blue)usr/lib64

However, uutils version of ls (v0.2.2) does not colorize the target according to the target file type. Meaning, you get:

(cyan)libpng12.so -> (cyan)libpng12.so.0.54.0
(cyan)libpng12.so.0 -> (cyan)libpng12.so.0.54.0
(green)libpng12.so.0.54.0

or

(cyan)lib -> (cyan)usr/lib
(cyan)lib32 -> (cyan)usr/lib32
(cyan)lib64 -> (cyan)usr/lib64

In other words, every symlinks targets are colorized as a symlink.

To test, I tried that other GNU version of 'ls' in place of the uutils version, and I get proper output on the same system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions