Describe the bug
-n 2 limits normal listing output to two entries. In tree mode, the same limit is ignored and all entries are printed.
To Reproduce
- Build the current repository:
go build -o /tmp/g-bug-audit .
- Create three files:
tmp=$(mktemp -d)
touch "$tmp/a" "$tmp/b" "$tmp/c"
- Run tree mode with a limit:
/tmp/g-bug-audit --no-config --disable-index --classic -A -T -n 2 "$tmp"
printf 'exit=%s tmp=%s\n' $? "$tmp"
- Actual output:
�[2m�[0mtmp.iWrYpNVtid
�[2m├── �[0ma
�[2m├── �[0mb
�[2m╰── �[0mc
exit=0 tmp=/var/folders/1b/57vdxmgj7s1glqm6tbsw1frm0000gn/T/tmp.iWrYpNVtid
- Control check with normal listing:
/tmp/g-bug-audit --no-config --disable-index --classic -A --byline -n 2 "$tmp"
Actual control output:
a
b
exit=0 tmp=/var/folders/1b/57vdxmgj7s1glqm6tbsw1frm0000gn/T/tmp.AEO3T7hoWn
- Expected output: tree mode should either honor
-n 2 consistently or reject the combination with an explicit error.
Screenshots
Not applicable.
Info (please complete the following information):
- OS: macOS darwin/arm64
- Version: v0.31.2, Go go1.26.1
Additional context
The limit appears to be applied only when tree mode is not active, so tree mode silently ignores a user-specified limit.
Describe the bug
-n 2limits normal listing output to two entries. In tree mode, the same limit is ignored and all entries are printed.To Reproduce
go build -o /tmp/g-bug-audit ./tmp/g-bug-audit --no-config --disable-index --classic -A --byline -n 2 "$tmp"Actual control output:
-n 2consistently or reject the combination with an explicit error.Screenshots
Not applicable.
Info (please complete the following information):
Additional context
The limit appears to be applied only when tree mode is not active, so tree mode silently ignores a user-specified limit.