store: tmux cc() alias in ~/.zshrc for auto-named Claude Code sessions
This commit is contained in:
parent
a5abad5c09
commit
12f5671070
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 56e448c8-1a23-46bb-9a2e-a40c3b048188
|
||||
type: configuration
|
||||
title: "tmux cc() alias in ~/.zshrc for auto-named Claude Code sessions"
|
||||
tags: [tmux, zshrc, alias, claude-code, claude-home, agent-teams, configuration]
|
||||
importance: 0.55
|
||||
confidence: 0.8
|
||||
created: "2026-02-26T18:14:48.637636+00:00"
|
||||
updated: "2026-02-26T18:14:48.637636+00:00"
|
||||
---
|
||||
|
||||
# tmux cc() alias for Claude Code session management
|
||||
|
||||
## Purpose
|
||||
Always run Claude Code inside tmux to enable Agent Teams tmux pane splitting and remote-control session persistence.
|
||||
|
||||
## Function definition (in ~/.zshrc, Aliases section)
|
||||
|
||||
```zsh
|
||||
cc() { tmux new -s "${1:-$(basename $PWD)}" -A; }
|
||||
```
|
||||
|
||||
## Behavior
|
||||
- `cc` — creates/attaches a tmux session named after the current directory basename
|
||||
- `cc custom-name` — creates/attaches a session with an explicit name
|
||||
- `-A` flag: attaches if session already exists, creates new if not
|
||||
|
||||
## Why tmux is required for Agent Teams
|
||||
Claude Code's experimental Agent Teams feature auto-detects tmux via the `$TMUX` env var and uses tmux split panes for sub-agent teammates. Without tmux, Agent Teams falls back to a non-visual mode.
|
||||
Loading…
Reference in New Issue
Block a user