Skip to content

Add tmux-ssh function — SSH into host and attach or create tmux session#66

Closed
jangroth wants to merge 5 commits into
mainfrom
auto/issue-50-tmux-ssh
Closed

Add tmux-ssh function — SSH into host and attach or create tmux session#66
jangroth wants to merge 5 commits into
mainfrom
auto/issue-50-tmux-ssh

Conversation

@jangroth

@jangroth jangroth commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds tmux-ssh <host> shell function to files/shell/functions/tmux-ssh
  • Uses tmux new-session -A -s main: attaches to an existing main session if one exists, otherwise creates a new one
  • Updates README.md to document the new helper function
  • Updates files/help/tmux (shown via dfh tmux) with tmux-ssh usage examples, replacing the raw SSH one-liner

Usage

tmux-ssh kylo
tmux-ssh 192.168.86.201

Test plan

  • Run make install and verify tmux-ssh is available in zsh
  • tmux-ssh <host> on a machine with no existing tmux session — should create one named main
  • tmux-ssh <host> on a machine with an existing main session — should attach to it
  • tmux-ssh with no argument — should print usage and exit 1
  • dfh tmux shows updated Sessions section with tmux-ssh examples

Closes #50

Implements a shell function that SSHes into a host and attaches to an
existing tmux session or creates a new one if none is running.

Closes #50

https://claude.ai/code/session_016qMLTkjgjrjoRno37WDr36
@jangroth jangroth force-pushed the auto/issue-50-tmux-ssh branch from ebbfd85 to 9e8a29a Compare May 1, 2026 11:08
jangroth added 3 commits May 2, 2026 21:14
Implements the function described in issue #50. Uses `tmux new-session -A -s main`
so it attaches to an existing session named 'main' if one exists, otherwise creates
a new one. Updates README and the dfh tmux help page accordingly.

Closes #50
@jangroth jangroth changed the title Add tmux-ssh function Add tmux-ssh function — SSH into host and attach or create tmux session May 5, 2026
SSHes into the given host and attaches to (or creates) a tmux session
named 'main', using `tmux new-session -A -s main`.

Closes #50
@jangroth jangroth closed this May 11, 2026
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.

Add tmux-ssh function — SSH into home network machine, attach or create tmux session

2 participants