Skip to content

Fix: slugify project shortName in tmux session naming#28

Merged
vaayne merged 1 commit intovaayne:mainfrom
x1nchen:fix/slugify-project-shortname-in-session-naming
Mar 28, 2026
Merged

Fix: slugify project shortName in tmux session naming#28
vaayne merged 1 commit intovaayne:mainfrom
x1nchen:fix/slugify-project-shortname-in-session-naming

Conversation

@x1nchen
Copy link
Copy Markdown
Contributor

@x1nchen x1nchen commented Mar 28, 2026

Summary

  • Directories starting with . (e.g. ~/.claude) produce a shortName like .claude, which gets passed directly into the tmux session name as .claude/main
  • tmux does not allow . in session names (. is used in the session:window.pane target syntax), causing session creation output to be unparseable → "Failed to parse created session" error
  • Apply slugify() to the projectShortName part in SessionNaming.sessionName(), so .claudeclaude/main, vue.jsvue-js/main

Test plan

  • All 202 existing MoriTmux assertions pass
  • New test testSessionNameSanitizesDotPrefix covers .claude and vue.js cases
  • Manual: add ~/.claude (or any dot-prefixed directory) as a workspace → should create tmux session without error

Directories starting with "." (e.g. ~/.claude) produce a shortName
like ".claude", which gets passed directly into the tmux session name.
tmux does not allow "." in session names (used in target syntax),
causing session creation to fail with "Failed to parse created session".

Apply slugify() to the projectShortName part as well, so ".claude"
becomes "claude" and "vue.js" becomes "vue-js" in session names.
Copy link
Copy Markdown
Owner

@vaayne vaayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

thanks @x1nchen

@vaayne vaayne merged commit a6d7ba5 into vaayne:main Mar 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants