Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tmux): sessions named as current dir #12351

Merged
merged 1 commit into from Apr 16, 2024

Conversation

jfpedroza
Copy link
Contributor

Standards checklist:

  • The PR title is descriptive.
  • The PR doesn't replicate another PR which is already open.
  • I have read the contribution guide and followed all the instructions.
  • The code follows the code style guide detailed in the wiki.
  • The code is mine or it's from somewhere with an MIT-compatible license.
  • The code is efficient, to the best of my ability, and does not waste computer resources.
  • The code is stable and I have tested it myself, to the best of my abilities.

Changes:

When $ZSH_TMUX_AUTONAME_SESSION=true, name the tmux session after the working directory.

If you are in ~/foo/bar, the name will be bar. If you are in ~/, the name will be home.

@ohmyzsh ohmyzsh bot added Area: plugin Issue or PR related to a plugin Type: documentation Documentation issue or Pull Request labels Apr 13, 2024
Copy link
Member

@carlosala carlosala left a comment

Choose a reason for hiding this comment

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

I like it! I'm ok with merging it! I'd name HOME in caps; it's less common to have a directory called HOME than home.
The only thing that's missing is a special case for /. Maybe ROOT?

@carlosala carlosala self-assigned this Apr 15, 2024
@jfpedroza
Copy link
Contributor Author

Never considered opening a session at /. I agree with ROOT.

@carlosala carlosala changed the title feat(tmux): Name sessions based on the current directory feat(tmux): sessions named as current dir Apr 16, 2024
@carlosala carlosala merged commit b26000d into ohmyzsh:master Apr 16, 2024
2 checks passed
@carlosala
Copy link
Member

Thanks for your contribution!

@jfpedroza jfpedroza deleted the tmux-session-pwd branch April 16, 2024 08:20
lukaselmer pushed a commit to lukaselmer/ohmyzsh that referenced this pull request Apr 16, 2024
cschuyle pushed a commit to cschuyle/ohmyzsh that referenced this pull request Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Type: documentation Documentation issue or Pull Request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants