diff --git a/README.md b/README.md index eb008a1..37ffeed 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,7 @@ _327 TILs and counting..._ - [Jumping Between Sessions](tmux/jumping-between-sessions.md) - [List All Key Bindings](tmux/list-all-key-bindings.md) - [List Sessions](tmux/list-sessions.md) +- [Open New Window With A Specific Directory](tmux/open-new-window-with-a-specific-directory.md) - [Organizing Windows](tmux/organizing-windows.md) - [Paging Up And Down](tmux/paging-up-and-down.md) - [Pane Killer](tmux/pane-killer.md) diff --git a/tmux/open-new-window-with-a-specific-directory.md b/tmux/open-new-window-with-a-specific-directory.md new file mode 100644 index 0000000..09cb40d --- /dev/null +++ b/tmux/open-new-window-with-a-specific-directory.md @@ -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 `:` 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)