mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Merge pull request #6 from trobrock/work-with-rvm
When specifying a windows default path, rvm no longer works
This commit is contained in:
@@ -17,8 +17,8 @@ new_window() {
|
||||
if [ -n "$2" ]; then local command=("$2"); fi
|
||||
if [ -n "$window" ]; then local winarg=(-n "$window"); fi
|
||||
|
||||
if [ -n "$window_root" ]; then cd "$window_root"; fi
|
||||
tmux new-window -t "$session:" "${winarg[@]}" "${command[@]}"
|
||||
__goto_window_or_session_path
|
||||
}
|
||||
|
||||
# Split current window/pane vertically.
|
||||
@@ -30,6 +30,7 @@ new_window() {
|
||||
split_v() {
|
||||
if [ -n "$1" ]; then local percentage=(-p "$1"); fi
|
||||
tmux split-window -t "$session:$window.$2" -v "${percentage[@]}"
|
||||
__goto_window_or_session_path
|
||||
}
|
||||
|
||||
# Split current window/pane horizontally.
|
||||
@@ -41,6 +42,7 @@ split_v() {
|
||||
split_h() {
|
||||
if [ -n "$1" ]; then local percentage=(-p "$1"); fi
|
||||
tmux split-window -t "$session:$window.$2" -h "${percentage[@]}"
|
||||
__goto_window_or_session_path
|
||||
}
|
||||
|
||||
# Select a specific window.
|
||||
@@ -234,3 +236,11 @@ __go_to_session() {
|
||||
tmux -u switch-client -t "$session:"
|
||||
fi
|
||||
}
|
||||
|
||||
__goto_window_or_session_path() {
|
||||
local window_or_session_root=${window_root-$session_root}
|
||||
if [ -n "$window_or_session_root" ]; then
|
||||
run_cmd "cd \"$window_or_session_root\""
|
||||
send_keys "C-l"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user