fix: scope hooks to DevDesk's tmux and reload env per Claude launch (0.2.1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,9 +10,18 @@ set -uo pipefail
|
||||
NAME=$(dd_current_session)
|
||||
[ -n "$NAME" ] || dd_die "not running inside a DevDesk session"
|
||||
|
||||
CLAUDE_BIN=${CLAUDE_BIN:-claude}
|
||||
SETTINGS="$DEVDESK_SHARE/claude-settings.json"
|
||||
read -r -a EXTRA <<<"${CLAUDE_ARGS:-}"
|
||||
|
||||
# Re-read /etc/devdesk/env before every Claude launch, so changes (Remote
|
||||
# Control, CLAUDE_ARGS, …) apply on the next restart of Claude in a session.
|
||||
reload_config() {
|
||||
if [ -r "$DEVDESK_ENV" ]; then
|
||||
# shellcheck source=/dev/null
|
||||
. "$DEVDESK_ENV"
|
||||
fi
|
||||
CLAUDE_BIN=${CLAUDE_BIN:-claude}
|
||||
read -r -a EXTRA <<<"${CLAUDE_ARGS:-}"
|
||||
}
|
||||
|
||||
ORANGE=$'\033[38;2;255;107;0m'
|
||||
CYAN=$'\033[38;2;0;212;255m'
|
||||
@@ -66,6 +75,7 @@ printf '\033]2;%s\033\134' "$NAME" # pane title (ST = ESC \\)
|
||||
mode=resume
|
||||
while :; do
|
||||
NAME=$(dd_current_session) # follow renames
|
||||
reload_config
|
||||
if [ "$mode" = new ]; then run_new; else run_resume; fi
|
||||
rc=$?
|
||||
NAME=$(dd_current_session)
|
||||
|
||||
Reference in New Issue
Block a user