Enable quiet saving

pull/73/head
Bruno Sutic 2015-02-12 12:53:19 +01:00
parent e1b01ee4f9
commit abad85f03b
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
2 changed files with 15 additions and 3 deletions

View File

@ -4,6 +4,7 @@
- bugfix: zoomed windows related regression
- export save and restore script paths so that 'tmux-resurrect-save' plugin can
use them
- enable "quiet" saving (used by 'tmux-resurrect-save' plugin)
### v2.1.0, 2015-02-12
- if restore is started when there's only **1 pane in the whole tmux server**,

View File

@ -10,6 +10,9 @@ source "$CURRENT_DIR/spinner_helpers.sh"
d=$'\t'
delimiter=$'\t'
# if "quiet" script produces no output
SCRIPT_OUTPUT="$1"
grouped_sessions_format() {
local format
format+="#{session_grouped}"
@ -210,12 +213,20 @@ save_all() {
restore_zoomed_windows
}
show_output() {
[ "$SCRIPT_OUTPUT" != "quiet" ]
}
main() {
if supported_tmux_version_ok; then
start_spinner "Saving..." "Tmux environment saved!"
if show_output; then
start_spinner "Saving..." "Tmux environment saved!"
fi
save_all
stop_spinner
display_message "Tmux environment saved!"
if show_output; then
stop_spinner
display_message "Tmux environment saved!"
fi
fi
}
main