File tree Expand file tree Collapse file tree
home/private_dot_config/zsh Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Track foreground command activity for each cmux terminal surface.
22if [[ -n " ${CMUX_WORKSPACE_ID:- } " && -n " ${CMUX_SURFACE_ID:- } " ]]; then
33 autoload -Uz add-zsh-hook
4+ typeset -g _cmux_agent_board_prompt_seen=false
45
56 _cmux_agent_board_command_started () {
67 " $HOME /.local/bin/cmux-agent-board-state" working > /dev/null
78 }
89
910 _cmux_agent_board_command_finished () {
11+ # Let cmux assign its directory-based title before the first prompt.
12+ if [[ " $_cmux_agent_board_prompt_seen " == false ]]; then
13+ _cmux_agent_board_prompt_seen=true
14+ return
15+ fi
1016 " $HOME /.local/bin/cmux-agent-board-state" idle > /dev/null
1117 }
1218
Original file line number Diff line number Diff line change @@ -100,7 +100,10 @@ chmod +x "$shell_home/.local/bin/cmux-agent-board-state"
100100HOME=" $shell_home " MOCK_SHELL_CALLS=" $shell_calls " \
101101 CMUX_WORKSPACE_ID=' workspace-id' CMUX_SURFACE_ID=' surface-id' \
102102 zsh -dfc '
103+ set -e
103104 source "$1"
105+ _cmux_agent_board_command_finished
106+ [[ ! -e "$MOCK_SHELL_CALLS" ]]
104107 _cmux_agent_board_command_started
105108 _cmux_agent_board_command_finished
106109 ' _ " $SHELL_HOOKS "
You can’t perform that action at this time.
0 commit comments