1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-05 16:18:01 +00:00

Add Change Base Directory Of Existing Session as a tmux til

This commit is contained in:
jbranchaud
2019-10-21 14:15:33 -05:00
parent c8ffa443dc
commit c67ac399bb
2 changed files with 19 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
For a steady stream of TILs from a variety of rocketeers, checkout
[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)
- [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 New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md)
- [Cycle Through Layouts](tmux/cycle-through-layouts.md)

View 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)