diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-11 05:34:37 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-11 05:34:37 -0500 |
| commit | de555fa8b48c5ed5f17c0a8db9de7ecb946aa75d (patch) | |
| tree | 162fd451e5944fc7ef60eeddc388e6a1f51e0c5d /tests | |
| parent | ca7015486d230192e94c51c0e5d014fc83a7a35f (diff) | |
| download | dotemacs-de555fa8b48c5ed5f17c0a8db9de7ecb946aa75d.tar.gz dotemacs-de555fa8b48c5ed5f17c0a8db9de7ecb946aa75d.zip | |
feat(ai-vterm): name the tmux session's first window "ai"
I pass `tmux new-session -n` so the window running the AI tool shows up as "ai" in the window list instead of auto-naming after the running program. A shell opened by hand in a later window still auto-names (e.g. "zsh"), so the two read distinctly. The name is a new `defcustom` (`cj/ai-vterm-tmux-window-name`), symmetric with the session-prefix custom.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-ai-vterm--launch-command.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test-ai-vterm--launch-command.el b/tests/test-ai-vterm--launch-command.el index 464c88b6..17f02f02 100644 --- a/tests/test-ai-vterm--launch-command.el +++ b/tests/test-ai-vterm--launch-command.el @@ -31,6 +31,22 @@ " -s aiv-foo " (cj/--ai-vterm-launch-command "/code/foo"))))) +(ert-deftest test-ai-vterm--launch-command-names-window () + "Normal: `-n <window-name>' so the claude window is named distinctly." + (let ((cj/ai-vterm-claude-command "claude") + (cj/ai-vterm-tmux-window-name "ai")) + (should (string-match-p + " -n ai " + (cj/--ai-vterm-launch-command "/code/foo"))))) + +(ert-deftest test-ai-vterm--launch-command-honors-custom-window-name () + "Boundary: a non-default window name is what `-n' gets." + (let ((cj/ai-vterm-claude-command "claude") + (cj/ai-vterm-tmux-window-name "claude")) + (should (string-match-p + " -n claude " + (cj/--ai-vterm-launch-command "/code/foo"))))) + (ert-deftest test-ai-vterm--launch-command-includes-start-directory () "Normal: `-c <dir>' so the new session's first window starts in DIR." (let ((cj/ai-vterm-claude-command "claude")) |
