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