mirror of
https://github.com/jbranchaud/til
synced 2026-01-06 16:48:01 +00:00
Add Change Base Directory Of Existing Session as a tmux til
This commit is contained in:
17
tmux/change-base-directory-of-existing-session.md
Normal file
17
tmux/change-base-directory-of-existing-session.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Change Base Directory Of Existing Session
|
||||
|
||||
Each tmux session has a base directory. This is determined when you first
|
||||
create the session. When you open a new window or pane, this will be used as
|
||||
the base directory of your new shell session.
|
||||
|
||||
You can change the base directory of an existing tmux session.
|
||||
|
||||
First, detach from the session: `<prefix>d`
|
||||
|
||||
Then, re-attach using the `-c` flag:
|
||||
|
||||
```bash
|
||||
$ tmux attach -t your-session-name -c /new/base/dir
|
||||
```
|
||||
|
||||
[source](https://stackoverflow.com/a/36435535/535590)
|
||||
Reference in New Issue
Block a user