On 2018/05/15 20:57, Marco Pfatschbacher wrote: > While doing some ad-hoc scripting on my command line, > I noticed that ls(1) defaults to multi-column output, > even if the output is piped to another command. > > The reason for this annoyance is simple: > $ alias |grep ls > ls='ls -CF' > > LS(1) > -C Force multi-column output; this is the default when > output is to a terminal. > > ls(1) can detect whether stdout isatty(3) all by itself. > > I think it's time to remove this artifact from 1996. > > OK?
OK with me. I'd also be OK with (and would slightly prefer) removing the alias completely, I often find that ls -F gets in the way in the same situations... > > Index: ksh.kshrc > =================================================================== > RCS file: /cvs/src/etc/ksh.kshrc,v > retrieving revision 1.31 > diff -u -p -p -u -r1.31 ksh.kshrc > --- ksh.kshrc 18 Feb 2018 21:48:00 -0000 1.31 > +++ ksh.kshrc 15 May 2018 18:50:40 -0000 > @@ -57,7 +57,7 @@ case "$-" in > > set -o emacs > > - alias ls='ls -CF' > + alias ls='ls -F' > alias h='fc -l | more' > > case "$TERM" in >
