mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Add Open New Window With A Specific Directory as a tmux til
This commit is contained in:
16
tmux/open-new-window-with-a-specific-directory.md
Normal file
16
tmux/open-new-window-with-a-specific-directory.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Open New Window With A Specific Directory
|
||||
|
||||
When you initially start a tmux session, the default directory is based off
|
||||
of whatever the current working directory was. Any subsequent windows opened
|
||||
within that tmux session will be opened with that as the base directory.
|
||||
|
||||
To open a window with a different default directory, use the `-c` flag with
|
||||
the `new-window` command. For example, hit `<prefix>:` and then
|
||||
|
||||
```
|
||||
:new-window -c ~/
|
||||
```
|
||||
|
||||
to open a new window with your home directory.
|
||||
|
||||
[source](http://unix.stackexchange.com/questions/12032/create-new-window-with-current-directory-in-tmux)
|
||||
Reference in New Issue
Block a user