diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 13:27:51 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 13:27:51 -0500 |
| commit | 7430215d0cb5ded0c2cfd01fd28cc040cd69e537 (patch) | |
| tree | 1d4931fbe6132cc2a4e15b59787a58ef46f2fbc2 /scripts/setup-reveal.sh | |
| parent | 739fd65cb403fe0fb4233dc09e9619517de2bc0d (diff) | |
| download | dotemacs-7430215d0cb5ded0c2cfd01fd28cc040cd69e537.tar.gz dotemacs-7430215d0cb5ded0c2cfd01fd28cc040cd69e537.zip | |
refactor(dirvish): extract cj/--duplicate-file-name helper
The name-mangling logic in `cj/dirvish-duplicate-file' was inline -- inseparable from the dired side effects (existence check, copy, revert). Extract to `cj/--duplicate-file-name', a pure function from FILE to FILE-WITH-COPY-SUFFIX. Seven Normal/Boundary tests cover the cases I care about: typical extension, elisp file, no extension, multi-dot extensions (only the last dot counts), leading-dot dotfiles, relative paths, spaces in the base name.
The wrapper retains the dired-mode interactive shape and now reads as a thin shell over the pure helper.
Diffstat (limited to 'scripts/setup-reveal.sh')
0 files changed, 0 insertions, 0 deletions
