aboutsummaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-13 13:49:21 -0500
committerCraig Jennings <c@cjennings.net>2026-06-13 13:49:21 -0500
commitf537150ff3f67899d27a7f121bc302f61a307c1c (patch)
tree325145d96c398575991d7be5006fdc5cb0f8895f /hooks
parent25bde1f7e342cdf428dbb9468d0d14323be34db6 (diff)
downloadrulesets-f537150ff3f67899d27a7f121bc302f61a307c1c.tar.gz
rulesets-f537150ff3f67899d27a7f121bc302f61a307c1c.zip
feat(hooks): title sessions host-project with a hyphen, no space
The SessionStart hook joined host and project with a space ("ratio rulesets"), which reads as two words in the claude.ai/code and mobile session lists. I changed the join to "$host-$project" ("ratio-rulesets") so the title is one token, and updated the three session-title-hook.bats expectations test-first.
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/session-title.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/hooks/session-title.sh b/hooks/session-title.sh
index 8a12f61..87fa4ad 100755
--- a/hooks/session-title.sh
+++ b/hooks/session-title.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# SessionStart(startup|resume) hook: title the session "<host> <project>"
-# (e.g. "ratio rulesets", "velox work") so remote sessions are identifiable
+# SessionStart(startup|resume) hook: title the session "<host>-<project>"
+# (e.g. "ratio-rulesets", "velox-work") so remote sessions are identifiable
# in the claude.ai/code and mobile session lists instead of auto-generated
# names.
#
@@ -38,4 +38,4 @@ fi
# uname -n, not hostname: Arch doesn't ship hostname by default (inetutils).
host=$(uname -n)
-python3 -c 'import json,sys; print(json.dumps({"hookSpecificOutput":{"hookEventName":"SessionStart","sessionTitle":sys.argv[1]}}))' "$host $project"
+python3 -c 'import json,sys; print(json.dumps({"hookSpecificOutput":{"hookEventName":"SessionStart","sessionTitle":sys.argv[1]}}))' "$host-$project"