SIGN IN SIGN UP

Support -F (--classify) option in ls (#117)

* Support -F (--classify) option in ls (#112)

Appends type indicators to entry names: / for directories, * for
executables, @ for symlinks. Works with all existing flags (-l, -a,
-R, -d, etc.). Uses lstat() for correct symlink detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use stat() for entry type, lstat() only for classify suffix

Addresses review feedback: the unconditional stat() → lstat() change
caused symlinks to directories to appear as regular files. Now stat()
is used for mode/size/type determination (follows symlinks), and
lstat() is only called when -F/--classify needs symlink detection.

Adds tests for symlink-to-directory with -F and -lF flags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
A
Aksel Skaar Leirvaag committed
be4b58ae5b0e94e19f660a14e948c941ec913c74
Parent: e92c4bf
Committed by GitHub <noreply@github.com> on 3/4/2026, 9:25:42 PM