emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#21325: closed (ls : feature request --width=zero)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#21325: closed (ls : feature request --width=zero)
Date: Sun, 23 Aug 2015 01:38:02 +0000

Your message dated Sat, 22 Aug 2015 18:37:00 -0700
with message-id <address@hidden>
and subject line Re: bug#21325: ls : feature request --width=zero
has caused the debbugs.gnu.org bug report #21325,
regarding ls : feature request --width=zero
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
21325: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21325
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: ls : feature request --width=zero Date: Sat, 22 Aug 2015 21:01:47 -0300
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

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

--- End Message ---
--- Begin Message --- Subject: Re: bug#21325: ls : feature request --width=zero Date: Sat, 22 Aug 2015 18:37:00 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0
Beco wrote:

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.

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

Attachment: 0001-ls-allow-w18446744073709551616.patch
Description: Text Data


--- End Message ---

reply via email to

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