Skip to content

Commit 54276a3

Browse files
author
Bruno Sutic
committed
Fix bug: new and split panes weren't setting the right path
1 parent a9e1a1f commit 54276a3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
the original one the split started from.
66
- improve the default new-window "c" binding so it creates new windows with the
77
same path as the current pane
8+
- bugfix for "|", "-" and "c" bindings - setting the correct path in new windows
9+
wasn't working properly with "$PWD". Changed to "#{pane_current_path}".
810

911
### v0.0.1, 2014-05-23
1012
- first version out

pain_control.tmux

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ pane_resizing_bindings() {
3535
}
3636

3737
pane_split_bindings() {
38-
tmux bind-key "|" split-window -h -c "$PWD"
39-
tmux bind-key "-" split-window -v -c "$PWD"
38+
echo $PWD
39+
tmux bind-key "|" split-window -h -c "#{pane_current_path}"
40+
tmux bind-key "-" split-window -v -c "#{pane_current_path}"
4041
}
4142

4243
improve_new_window_binding() {
43-
tmux bind-key "c" new-window -c "$PWD"
44+
tmux bind-key "c" new-window -c "#{pane_current_path}"
4445
}
4546

4647
main() {

0 commit comments

Comments
 (0)