diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 13:44:40 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 13:44:40 -0500 |
| commit | 2b19eb175d0664908f76bf7cc8dcc1eb5c140ce1 (patch) | |
| tree | 9beb7545eb65385b13246e561e764844ba49eb70 /docs | |
| parent | cffdf3b92a97b1af3aedec624a9fb43db1c60ef8 (diff) | |
| download | dotemacs-2b19eb175d0664908f76bf7cc8dcc1eb5c140ce1.tar.gz dotemacs-2b19eb175d0664908f76bf7cc8dcc1eb5c140ce1.zip | |
refactor(dirvish): extract cj/--dired-line-is-directory-p
`cj/dired-mark-all-visible-files' classified the current line as a directory via `(looking-at "^. d")' inline. Lift the classification into `cj/--dired-line-is-directory-p', a string predicate that takes a line and returns non-nil when it's a directory listing. The wrapper still walks the dired buffer line by line and calls `dired-mark' -- that iteration is dired-coupled and stays untested -- but the format-aware predicate is now isolated and verified.
Six Normal/Boundary tests cover unmarked directories, marked directories (`*' prefix), regular files (`-' instead of `d'), symlinks (`l'), empty lines, and dired header lines (` /path:' and ` total N').
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
