bug-coreutils
[Top][All Lists]
Advanced

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

bug#21325: ls : feature request --width=zero


From: Beco
Subject: bug#21325: ls : feature request --width=zero
Date: Sat, 22 Aug 2015 23:08:11 -0300



On 22 August 2015 at 22:37, Paul Eggert <address@hidden> wrote:
That's annoying.  Thanks for the bug report.  I'm a bit dubious about equating zero to infinity, though, so I installed the attached patch instead.  It will let you use whatever large number you like.  E.g.:

  ls -w999999999999999999999999999999999999999999999999999999999999999999

will do the right thing.  For now, you can work around the problem with:

  ls -w4294967295

which should work on unpatched GNU ‘ls’.


Hello, Paul,

Thanks for the quick answer.

Regarding the zero being infinity, well, it doesn't need to be zero.

But a shortcut would be nice. For example, instead of:

ls -w999999999999999999999999999999999999999999999999999999999999999999

it could be ls -wMAX

I thought about zero because: 

1- its a number, easier to implement (than parsing a word like MAX)
2- its not being used (gives an error if you try) (*)

Its just that a script with so many 99..99 numbers would be hard to read, nothing more.

Ty,
Beco

--
(*) Debian Jessie:
$ ls -m -w0
ls: invalid line width: 0
$ ls -m -w18446744073709551616
ls: invalid line width: 18446744073709551616
$ ls -m -w18446744073709551615
(runs ok, no error)



--
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

Creation date: pgp.mit.edu ID as of 2014-11-09

reply via email to

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