Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion templates/claude-code/scripts/smart-notify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@ if command -v terminal-notifier >/dev/null 2>&1; then
-message "$MSG" \
-sound "$SOUND"
else
osascript -e "display notification \"$MSG\" with title \"Claude Code ($SESSION_DIR) - $TITLE\" sound name \"$SOUND\""
# Escape special characters for AppleScript (only double quotes and backslashes)
MSG_ESCAPED=$(printf '%s' "$MSG" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g')
TITLE_FULL="Claude Code ($SESSION_DIR) - $TITLE"
TITLE_ESCAPED=$(printf '%s' "$TITLE_FULL" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g')

osascript -e "display notification \"$MSG_ESCAPED\" with title \"$TITLE_ESCAPED\" sound name \"$SOUND\""
fi