summaryrefslogtreecommitdiff
path: root/dotfiles/system/.local
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-10 08:00:54 -0600
committerCraig Jennings <c@cjennings.net>2026-01-10 08:00:54 -0600
commit4fb8ac514ed0c3ed1455df3e2f4f06f15caef93a (patch)
treee795e312c51beaffbd340270c7f8ad87acc0232a /dotfiles/system/.local
parent70597c8cddf40b3b903eb773eee84196b5d7978b (diff)
session: fix ai-assistants tilde expansion for tmux -c optionHEADmain
tmux's -c option doesn't expand ~ so windows were starting in $HOME instead of project directories. Expand tilde to $HOME before passing to tmux. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'dotfiles/system/.local')
-rwxr-xr-xdotfiles/system/.local/bin/ai-assistants2
1 files changed, 2 insertions, 0 deletions
diff --git a/dotfiles/system/.local/bin/ai-assistants b/dotfiles/system/.local/bin/ai-assistants
index 764dfd7..526be6a 100755
--- a/dotfiles/system/.local/bin/ai-assistants
+++ b/dotfiles/system/.local/bin/ai-assistants
@@ -27,6 +27,7 @@ CLAUDE_CMD='claude "Please read ./docs/NOTES.org and begin the session start wor
first="${projects[0]}"
name="${first%%:*}"
dir="${first#*:}"
+dir="${dir/#\~/$HOME}"
tmux new-session -d -s "$SESSION" -n "$name" -c "$dir"
tmux send-keys -t "$SESSION:$name" "$CLAUDE_CMD" Enter
@@ -34,6 +35,7 @@ tmux send-keys -t "$SESSION:$name" "$CLAUDE_CMD" Enter
for project in "${projects[@]:1}"; do
name="${project%%:*}"
dir="${project#*:}"
+ dir="${dir/#\~/$HOME}"
tmux new-window -t "$SESSION" -n "$name" -c "$dir"
tmux send-keys -t "$SESSION:$name" "$CLAUDE_CMD" Enter
done