Paul Eggert <eggert <at> CS.UCLA.EDU> writes: > > ls is not one of those commands. So rather than listing > > stdin or stdout (neither of which makes sense) > > Actually, it would make a lot of sense for 'ls' to list stdin, no? > 'ls' could apply fstat to stdin and show the results.
POSIX says: "Where a utility described in the Shell and Utilities volume of POSIX.1-2008 as conforming to these guidelines is required to accept, or not to accept, the operand ’−’ to mean standard input or output, this usage is explained in the OPERANDS section. Otherwise, if such a utility uses operands to represent files, it is implementation-defined whether the operand ’−’ stands for standard input (or standard output), or for a file named −." And OPERANDS for ls(1) doesn't mention behavior either way. So I'm in favor of such a change. But it takes some thought. Would: ls - < . behave like 'ls .' or 'ls -d .'? -- Eric Blake