|
From: | Hal Ashburner |
Subject: | Re: [PATCH] filter ls output by filetype |
Date: | Fri, 29 Nov 2013 02:12:12 +1100 |
Hi,
I don't like '--just' because it does not tell what this is about. One
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?)
might confuse it with something regarding (left- or right-) justification.
How about --list-type? I'd say the name should contain 'type' and
something to differentiate it from '--file-type'.
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.
[Prev in Thread] | Current Thread | [Next in Thread] |