mirror of
https://github.com/jbranchaud/til
synced 2026-01-07 09:08:01 +00:00
Add Change Base Directory Of Existing Session as a tmux til
This commit is contained in:
@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
|
|||||||
For a steady stream of TILs from a variety of rocketeers, checkout
|
For a steady stream of TILs from a variety of rocketeers, checkout
|
||||||
[til.hashrocket.com](https://til.hashrocket.com/).
|
[til.hashrocket.com](https://til.hashrocket.com/).
|
||||||
|
|
||||||
_856 TILs and counting..._
|
_857 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -722,6 +722,7 @@ _856 TILs and counting..._
|
|||||||
|
|
||||||
- [Adjusting Window Pane Size](tmux/adjusting-window-pane-size.md)
|
- [Adjusting Window Pane Size](tmux/adjusting-window-pane-size.md)
|
||||||
- [Break Current Pane Out To Separate Window](tmux/break-current-pane-out-to-separate-window.md)
|
- [Break Current Pane Out To Separate Window](tmux/break-current-pane-out-to-separate-window.md)
|
||||||
|
- [Change Base Directory Of Existing Session](tmux/change-base-directory-of-existing-session.md)
|
||||||
- [Create A Named tmux Session](tmux/create-a-named-tmux-session.md)
|
- [Create A Named tmux Session](tmux/create-a-named-tmux-session.md)
|
||||||
- [Create A New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md)
|
- [Create A New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md)
|
||||||
- [Cycle Through Layouts](tmux/cycle-through-layouts.md)
|
- [Cycle Through Layouts](tmux/cycle-through-layouts.md)
|
||||||
|
|||||||
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