Describe the bug
The help text says --show-only-hidden, --hidden is overridden by --show-hidden/-a/-A, but combining these flags still keeps the HiddenOnly filter active.
As a result, --hidden --show-hidden or --hidden -A only prints hidden files instead of showing all matching entries.
To Reproduce
- Create a directory with one visible file and one hidden file:
tmp=$(mktemp -d)
touch "$tmp/visible" "$tmp/.hidden"
- Run:
./g -A --hidden --show-hidden --no-icon --color never "$tmp"
- Only
.hidden is shown. visible is missing.
Screenshots
Not applicable.
Info (please complete the following information):
- OS: macOS (darwin/arm64)
- Version: v0.31.2
Additional context
--hidden appends filter.HiddenOnly, while -a and -A only delete filter.RemoveHidden. They do not remove HiddenOnly, so the documented override does not happen.
Describe the bug
The help text says
--show-only-hidden, --hiddenis overridden by--show-hidden/-a/-A, but combining these flags still keeps theHiddenOnlyfilter active.As a result,
--hidden --show-hiddenor--hidden -Aonly prints hidden files instead of showing all matching entries.To Reproduce
./g -A --hidden --show-hidden --no-icon --color never "$tmp".hiddenis shown.visibleis missing.Screenshots
Not applicable.
Info (please complete the following information):
Additional context
--hiddenappendsfilter.HiddenOnly, while-aand-Aonly deletefilter.RemoveHidden. They do not removeHiddenOnly, so the documented override does not happen.