Dear developers,

I'm writing to ask for a small change in an already existing feature of
"ls" command.

The switch is: -w, --width=COLS

Let it be possible to state size ZERO as being "infinity", for example:

(A)
ls -m -w0

(B)
ls -x --width=0

That will ensure that:

ls -m -w0 | wc -l
1

Meaning that ls will output a single line.

For now a workaround is just use a very big number for width, say -w10000,
but this hack must be checked beforehand in any directory.

LSSIZE=1000; test $(ls -x -w$LSSIZE | wc -l) == 1 && echo size $LSSIZE ok
|| echo size $LSSIZE not ok

I hope :

* I could inspire you to understand the easy modification that's asked
* the usefulness of the modification

Thanks,
Beco


-- 
Dr Beco
A.I. researcher

"I know you think you understand what you thought I said but I'm not sure
you realize that what you heard is not what I meant" -- Alan Greenspan

GPG Key: https://pgp.mit.edu/pks/lookup?op=vindex&search=0x5A107A425102382A
Creation date: pgp.mit.edu ID as of 2014-11-09

Reply via email to