bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Mathias MICHEL <matm@gmx.fr>
Cc: 69261-done@debbugs.gnu.org
Subject: bug#69261: 'ls' : --ignore does not apply on FILEs selection
Date: Sun, 18 Feb 2024 22:45:00 -0800	[thread overview]
Message-ID: <1e3795ac-d6cd-4b88-ab4b-9dcf6e8d595b@cs.ucla.edu> (raw)
In-Reply-To: <20240218220739.Horde.3QvqAlNN0q_OhfYP-ZBJJra@grenier.mcxi.eu>

On 2024-02-18 14:07, Mathias MICHEL via GNU coreutils Bug Reports wrote:

> Is it expected that --ignore arg does not apply on globbed FILE ?

Yes. --ignore is about what 'ls' finds in directories, not about 
command-line arguments.

> My goal is to avoid using grep or complex find args:
>> > ~/.ssh :: ls id_ed* | grep -v "\.pub$" > id_ed25519 id_ed25519.local id_ed25519_ori

Try this:

   ls --hide='[^i]*' --hide='i[^d]*' --hide='id[^_]*' --hide='id_[^e]*' 
--hide='id_e[^d]*' --hide='*.pub'

Admittedly ugly, but does the job.




       reply	other threads:[~2024-02-19  6:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240218220739.Horde.3QvqAlNN0q_OhfYP-ZBJJra@grenier.mcxi.eu>
2024-02-19  6:45 ` Paul Eggert [this message]
2024-02-20 20:33 ` bug#69261: Further discussion on option processing Mathias MICHEL via GNU coreutils Bug Reports
2024-02-21  2:56   ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e3795ac-d6cd-4b88-ab4b-9dcf6e8d595b@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=69261-done@debbugs.gnu.org \
    --cc=matm@gmx.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).