mirror of
				https://github.com/tmux-plugins/tmux-resurrect.git
				synced 2025-11-04 08:56:03 +00:00 
			
		
		
		
	Enable quiet saving
This commit is contained in:
		@@ -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**,
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user