coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH 0/4] ls: have classify take optional argument


From: Pádraig Brady
Subject: Re: [PATCH 0/4] ls: have classify take optional argument
Date: Mon, 27 Apr 2020 13:51:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Thunderbird/76.0

On 19/04/2020 23:12, Pádraig Brady wrote:
On 19/04/2020 09:40, Jason Kim wrote:
`ls --classify` prints extra characters that are helpful to users.
Users may wish to turn that flag on by default (e.g. through a shell
alias or `LS_OPTIONS`).  However, it is unfriendly to use it in
combination with other commands (e.g. `alias ls='ls --classify'; ls |
grep '.sh$'`).

Add an optional argument to `--classify` indicating _when_ to classify,
just like the optional argument for `--color`.  This lets users use `ls
--classify=auto` to prevent the classify indicator style from activating
when the output is not to a TTY.

Add a test `tests/ls/classify.sh`, and update documentation.

Thanks a lot for the patch.
I like the idea and think we should apply this.
I'll squash and apply this soon.

Pushed with a couple of tweaks in the test:
https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=9c8a385aa

thanks again!

Pádraig



reply via email to

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