Add tmux-ssh function — SSH into host and attach or create tmux session#66
Closed
jangroth wants to merge 5 commits into
Closed
Add tmux-ssh function — SSH into host and attach or create tmux session#66jangroth wants to merge 5 commits into
jangroth wants to merge 5 commits into
Conversation
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
ebbfd85 to
9e8a29a
Compare
SSHes into the given host and attaches to (or creates) a tmux session named 'main', using `tmux new-session -A -s main`. Closes #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tmux-ssh <host>shell function tofiles/shell/functions/tmux-sshtmux new-session -A -s main: attaches to an existingmainsession if one exists, otherwise creates a new oneREADME.mdto document the new helper functionfiles/help/tmux(shown viadfh tmux) withtmux-sshusage examples, replacing the raw SSH one-linerUsage
Test plan
make installand verifytmux-sshis available in zshtmux-ssh <host>on a machine with no existing tmux session — should create one namedmaintmux-ssh <host>on a machine with an existingmainsession — should attach to ittmux-sshwith no argument — should print usage and exit 1dfh tmuxshows updated Sessions section withtmux-sshexamplesCloses #50