aboutsummaryrefslogtreecommitdiff
path: root/scripts/wipedisk
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-19 13:17:06 -0500
committerCraig Jennings <c@cjennings.net>2026-05-19 13:17:06 -0500
commita33eb10faddba2595deba81f52f89352255f1cf2 (patch)
tree5ef12ab34478fc7b1b478402f3937802d7d25403 /scripts/wipedisk
parentd78c6b906afa4c29f56f6d9eb050961b0df5b703 (diff)
downloadarchsetup-a33eb10faddba2595deba81f52f89352255f1cf2.tar.gz
archsetup-a33eb10faddba2595deba81f52f89352255f1cf2.zip
feat(tmux-util): add rename subcommand (fzf pick + prompt)
tmux-util rename closes out the original six-subcommand plan. The flow: 1. fzf-pick a session from the list. 2. Prompt for a new name on stdin. 3. Bail with a useful message on empty input, same-as-old, or conflict with an existing session. 4. Otherwise `tmux rename-session -t <old> <new>` and confirm. The conflict check uses `tmux has-session -t =<new>` with the same `=`-prefix exact-match guard as the go subcommand. Without it, tmux's default prefix matching would let `rename foo` succeed even when a session named `foobar` already exists, then surprise the user later. 5 new tests cover Normal cases (pick + rename happy path) and Boundary cases (no sessions, fzf cancel, empty new name, same-as-old no-op, conflict with existing session). The test harness's run_script grew an `stdin=` param so tests can feed the prompt input. fake-tmux picked up a rename-session handler that mutates the state file. Total suite: 48 tests, all green. Six subcommands shipped: go, pick, ls, find, reap, rename. The original "no args prints help" requirement still holds, and the stub-test for unimplemented subcommands got removed since everything's wired now.
Diffstat (limited to 'scripts/wipedisk')
0 files changed, 0 insertions, 0 deletions