mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
Enable quiet saving
This commit is contained in:
parent
e1b01ee4f9
commit
abad85f03b
@ -4,6 +4,7 @@
|
|||||||
- bugfix: zoomed windows related regression
|
- bugfix: zoomed windows related regression
|
||||||
- export save and restore script paths so that 'tmux-resurrect-save' plugin can
|
- export save and restore script paths so that 'tmux-resurrect-save' plugin can
|
||||||
use them
|
use them
|
||||||
|
- enable "quiet" saving (used by 'tmux-resurrect-save' plugin)
|
||||||
|
|
||||||
### v2.1.0, 2015-02-12
|
### v2.1.0, 2015-02-12
|
||||||
- if restore is started when there's only **1 pane in the whole tmux server**,
|
- if restore is started when there's only **1 pane in the whole tmux server**,
|
||||||
|
@ -10,6 +10,9 @@ source "$CURRENT_DIR/spinner_helpers.sh"
|
|||||||
d=$'\t'
|
d=$'\t'
|
||||||
delimiter=$'\t'
|
delimiter=$'\t'
|
||||||
|
|
||||||
|
# if "quiet" script produces no output
|
||||||
|
SCRIPT_OUTPUT="$1"
|
||||||
|
|
||||||
grouped_sessions_format() {
|
grouped_sessions_format() {
|
||||||
local format
|
local format
|
||||||
format+="#{session_grouped}"
|
format+="#{session_grouped}"
|
||||||
@ -210,12 +213,20 @@ save_all() {
|
|||||||
restore_zoomed_windows
|
restore_zoomed_windows
|
||||||
}
|
}
|
||||||
|
|
||||||
|
show_output() {
|
||||||
|
[ "$SCRIPT_OUTPUT" != "quiet" ]
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
if supported_tmux_version_ok; then
|
if supported_tmux_version_ok; then
|
||||||
|
if show_output; then
|
||||||
start_spinner "Saving..." "Tmux environment saved!"
|
start_spinner "Saving..." "Tmux environment saved!"
|
||||||
|
fi
|
||||||
save_all
|
save_all
|
||||||
|
if show_output; then
|
||||||
stop_spinner
|
stop_spinner
|
||||||
display_message "Tmux environment saved!"
|
display_message "Tmux environment saved!"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
main
|
main
|
||||||
|
Loading…
Reference in New Issue
Block a user