coreutils
[Top][All Lists]
Advanced

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

Re: "ls command" Suggest --ignore case switch for wildcards, regex use.


From: Bernhard Voelker
Subject: Re: "ls command" Suggest --ignore case switch for wildcards, regex use.
Date: Tue, 19 Jan 2021 00:26:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/18/21 1:15 PM, Andre Gompel wrote:
> Hello:
> 
> *ls command:*
> 
> Suggest to add *--ignorecase *switch applicable when used with wildcards,
> regex etc... in a way consistent with grap, egrep etc ?
> 
> The short -i switch s already used for inode.
> So * -I  *(upper case i) cold be used there... perhaps for inode, to keep
> consistency with the various grep commands etc...

nope, upper-case -I is also already taken.

> Thanks for the attention, perhaps a reply.
> 
> Andre GompeL

Just to clarify: the only ls(1) options taking a pattern are:

  $ ls --help | grep PAT
        --hide=PATTERN         do not list implied entries matching shell 
PATTERN
    -I, --ignore=PATTERN       do not list implied entries matching shell 
PATTERN

I'd assume that these options are very rarely used, and therefore I have
the impression that you meant something else: I guess you mean the call
like:

  $ touch somefile someother
  $ ls some*
  somefile someother

Now, this is nothing we can change in ls(1) since the calling shell already
does the pattern matching and calls ls(1) with the expanded list of files.
One can see this with:

  $ echo ls some*
  ls somefile someother


Have a nice day,
Berny





reply via email to

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