[Top][All Lists]

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

Re: [PATCH] filter ls output by filetype

From: Hal Ashburner
Subject: Re: [PATCH] filter ls output by filetype
Date: Fri, 29 Nov 2013 02:12:12 +1100

On 29 November 2013 01:31, Erik Auerswald <address@hidden> wrote:

On Fri, Nov 29, 2013 at 12:49:19AM +1100, Hal Ashburner wrote:
> ls filters by filename - leading dot -a -A or --ignore pattern
> I have shell script that just shows directories by interposing `test`
> between two calls to ls in a pipeline to give me ls like behavior. Ls
> actually knows the filetype so I thought why not just filter on it in ls
> given filtering is something ls does? I noted this was not a rejected
> feature request and thought it might go well as a request accompanied by a
> patch.
> --just
> was the best switch I could think of to achieve this end. I could easily be
> convinced there exists a better one. (--show-only? --showing?)

I don't like '--just' because it does not tell what this is about. One
might confuse it with something regarding (left- or right-) justification.

I don't like --just much either.

How about --list-type? I'd say the name should contain 'type' and
something to differentiate it from '--file-type'.

Sounds pretty reasonable.
Anyway, ls --file-type | grep _might_ work most of the time, but would
become difficult with e.g. spaces or newlines in a file name, thus I'd
say this functionality looks useful.


reply via email to

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