From 4fb8ac514ed0c3ed1455df3e2f4f06f15caef93a Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 10 Jan 2026 08:00:54 -0600 Subject: session: fix ai-assistants tilde expansion for tmux -c option 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 --- dotfiles/system/.local/bin/ai-assistants | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dotfiles/system/.local') 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 -- cgit v1.2.3