4 Commits

Author SHA1 Message Date
e242ea6d8d v1.2.1 2014-09-02 22:48:50 +02:00
a0a3f2fd56 When a pane is not restored, don't restore it's program 2014-09-02 22:47:38 +02:00
d606106f1c Fix: command prompt not ideal after a restore
Fixes #36
2014-09-02 22:34:00 +02:00
d5598d1c61 Update readme 2014-09-01 21:18:15 +02:00
4 changed files with 14 additions and 4 deletions

View File

@ -2,6 +2,12 @@
### master
### v1.2.1, 2014-09-02
- tweak 'new_pane' creation strategy to fix #36
- when running multiple tmux server and for a large number of panes (120 +) when
doing a restore, some panes might not be created. When that is the case also
don't restore programs for those panes.
### v1.2.0, 2014-09-01
- new feature: inline strategies when restoring a program

View File

@ -98,8 +98,8 @@ Open a GitHub issue if you think some other program should be on the default lis
set -g @resurrect-processes 'irb pry "~rails server" "~rails console"'
- If the wrong command is restored, try specifying inline strategy for the
program with `->`:
- Use `->` to specify a command to be used when restoring a program (useful if
the default restore command fails ):
set -g @resurrect-processes 'some_program "grunt->grunt development"'

View File

@ -43,6 +43,9 @@ _process_should_be_restored() {
# Scenario where pane existed before restoration, so we're not
# restoring the proces either.
return 1
elif ! pane_exists "$session_name" "$window_number" "$pane_index"; then
# pane number limit exceeded, pane does not exist
return 1
elif _restore_all_processes; then
return 0
elif _process_on_the_restore_list "$pane_full_command"; then

View File

@ -99,8 +99,9 @@ new_pane() {
local window_number="$2"
local window_name="$3"
local dir="$4"
tmux split-window -t "${session_name}:${window_number}" -c "$dir" -h
tmux resize-pane -t "${session_name}:${window_number}" -L "999"
tmux split-window -t "${session_name}:${window_number}" -c "$dir"
# minimize window so more panes can fit
tmux resize-pane -t "${session_name}:${window_number}" -U "999"
}
restore_pane() {