diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 13:34:24 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 13:34:24 -0500 |
| commit | 3c840b0569ba3461cd61eabc32919f6899a25163 (patch) | |
| tree | e601b0080d7e923d3c3e66446d9d01c474923314 /scripts/setup-reveal.sh | |
| parent | 1f907e40bb2124084e336d429cd60830df6aa369 (diff) | |
| download | dotemacs-3c840b0569ba3461cd61eabc32919f6899a25163.tar.gz dotemacs-3c840b0569ba3461cd61eabc32919f6899a25163.zip | |
refactor(dirvish): extract playlist filter and sanitize helpers
`cj/dired-create-playlist-from-marked' had its audio-file filtering and trailing-`.m3u' stripping inline among the dired marking, prompting, overwrite-loop, and file-write logic. Lift each into its own pure helper:
- `cj/--playlist-filter-audio (files extensions)' returns only files whose extension matches one of EXTENSIONS (lowercase, no dot). Case-insensitive on the file side.
- `cj/--playlist-sanitize-name (name)' strips a trailing `.m3u' suffix; embedded `.m3u' that isn't at the end is preserved.
Ten Normal/Boundary tests cover keep-only-audio, case-insensitivity, files-without-extension excluded, empty inputs, and the sanitize edge cases (bare name, embedded `.m3u', empty string, just `.m3u').
Diffstat (limited to 'scripts/setup-reveal.sh')
0 files changed, 0 insertions, 0 deletions
