bug-coreutils
[Top][All Lists]
Advanced

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

bug#25388: Bug in ls, kills existing scripts reading "ls" -1 as input


From: L A Walsh
Subject: bug#25388: Bug in ls, kills existing scripts reading "ls" -1 as input
Date: Mon, 09 Jan 2017 11:00:20 -0800
User-agent: Thunderbird

Paul Eggert wrote:
L A Walsh wrote:
    Having 'ls' show different output through a pager than it
does when scrolling off the screen is not a standard feature.

Sure it is. 'ls' has done that since then 1980s. 'ls' shows multicolumn output when the output is a tty, and single-column output when piped into a pager.
----
That would be really annoying if it were true.  It doesn't do that
on any of my *nix terms.  When I put it through a pager I want it to page
the output I just saw.  That's what it's for.

I.e. using a pager, should not, by default, change the output
of programs.  It's purpose is to moderate the output stream
so a user can read what was output when they ran it without
the pager.  Changing the output, by default, depending on
pager usage defeats the primary purpose of pagers.

If it became common place for programs to detect pager use
and generate different output, it would seriously harm the
intended use of pagers, since you would no longer be able to
page the output of those programs (since what you are paging
isn't the original output).

FWIW: If I want 1-column output, I usually use "-1". That's what it is for, no?

-l











reply via email to

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