-
Notifications
You must be signed in to change notification settings - Fork 37
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
Should set session start-diretory to current working directory. #4
Comments
Hi, I'm curious, why do you need this feature? |
@bruno- by default the behavior of Most of the time when when I create new sessions I am doing so because I want to be working in an entirely different context--I want new panes & windows to start off in a specific directory. As a shortcut, the create named session feature doesn't have much practical value for me if the new named session always has the same start-directory as the old.` In the past I have simply created a new terminal window and started my tmux sessions after navigating to the specific project directory that I wanted to be the start directory. |
Hi. I was bothered by this issue as well and solved it by making the following changes to new_session_promt.sh: #!/usr/bin/env bash CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" main() { and then to use the current pane directory I have added this in new_session.sh: #!/usr/bin/env bash CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #global variable source "$CURRENT_DIR/helpers.sh" session_name_not_provided() { create_new_tmux_session() { main() { This will always use the directory of the current pane when a new session is created. Please let me know if you can include this in the current plugin. Best NB: It is just a quick hack, the checks for provided session names etc. should be modified in a release version |
If you are concerned about making this the default behavior, then maybe make it opt-in using a variable set in ~/.tmux.conf
The text was updated successfully, but these errors were encountered: