[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69261: 'ls' : --ignore does not apply on FILEs selection
From: |
Mathias MICHEL |
Subject: |
bug#69261: 'ls' : --ignore does not apply on FILEs selection |
Date: |
Sun, 18 Feb 2024 22:07:39 +0000 |
User-agent: |
Horde Application Framework 5 |
Hello,
Is it expected that --ignore arg does not apply on globbed FILE ?
My goal is to avoid using grep or complex find args:
> ~/.ssh :: ls id_ed* | grep -v
"\.pub$"id_ed25519id_ed25519.localid_ed25519_ori
> ~/.ssh:: find . '!' -name '*.pub' -name
"id_ed*"./id_ed25519_ori./id_ed25519.local./id_ed25519
I tried -I (--ignore) and --hide :
> ~/.ssh:: ls -I"*.pub" id_ed* id_ed25519 id_ed25519.local
id_ed25519.local.pub id_ed25519_ori
id_ed25519_ori.pub id_ed25519.pub> ~/.ssh:: ls --hide "*.pub"
id_ed* id_ed25519 id_ed25519.local id_ed25519.local.pub
id_ed25519_ori id_ed25519_ori.pub id_ed25519.pub
Since help text says for both options is : do not list implied entries
matching shell PATTERN
I would expect it to occur after building the initial listing.
When I remove the globbing pattern, it seems to work as expected:
~/.ssh:: ls -I "*.pub" ./config id_ed25519 id_ed25519.local
id_ed25519_ori id_rsa.local known_hosts known_hosts.old~/.ssh:: ls
-I "*.pub"config id_ed25519 id_ed25519.local id_ed25519_ori
id_rsa.local known_hosts known_hosts.old
Man page says nothing about conflicts with file globbing. My view is
obviously that this is a miss, what are yours ?
Thanks for your feedback--
Mathias M
- bug#69261: 'ls' : --ignore does not apply on FILEs selection,
Mathias MICHEL <=