GNU bug report logs -
#69261
'ls' : --ignore does not apply on FILEs selection
Previous Next
Reported by: Mathias MICHEL <matm <at> gmx.fr>
Date: Mon, 19 Feb 2024 03:19:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 2024-02-20 12:33, Mathias MICHEL via GNU coreutils Bug Reports wrote:
> I don't understand why --hide is depending on whether FILEs were provided
> or not to the command. This is the opposite of what Paul stated.
It's not the opposite of what I stated. I said that --hide affects only
files that 'ls' finds in directories itself (e.g., via ls -R); it does
not affect command-line arguments. That's the behavior you're observing,
and that's the documented behavior.
As for "why", it's similar to ls's behavior with files starting with
".". Normally ls doesn't display them, but if you give an explicit
command-line argument (e.g., "ls -d .") it displays them, regardless of
whether you've also specified -a or -A or whatever.
It's not likely that we'd change ls's behavior for the command-line
arguments you gave, as it's been behaving this way for years and other
people likely depend on this behavior. However, you can get get the
behavior that you want by using a different set of command-line
arguments (see my previous email), so you might try doing that.
This bug report was last modified 1 year and 90 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.