aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/lib/validation.sh
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
commitf91586248f467a2ba7a62f76caee1f40927655d9 (patch)
tree39ff6ae73fa53f8164c0a8ad104dc550313cad44 /scripts/testing/lib/validation.sh
parent95e1e0be4905ff5d37b52f889f5dda65543e2b51 (diff)
downloadarchsetup-f91586248f467a2ba7a62f76caee1f40927655d9.tar.gz
archsetup-f91586248f467a2ba7a62f76caee1f40927655d9.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/testing/lib/validation.sh')
0 files changed, 0 insertions, 0 deletions