mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
Refactor checking if tmux session file exists
This commit is contained in:
parent
3da5d61b5b
commit
655bdb9a75
@ -1,6 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
### master
|
### master
|
||||||
|
- refactor checking if saved tmux session exists
|
||||||
|
|
||||||
### v0.0.5, 2014-08-28
|
### v0.0.5, 2014-08-28
|
||||||
- restore pane processes
|
- restore pane processes
|
||||||
|
@ -15,8 +15,8 @@ is_line_type() {
|
|||||||
check_saved_session_exists() {
|
check_saved_session_exists() {
|
||||||
local saved_session="$(last_session_path)"
|
local saved_session="$(last_session_path)"
|
||||||
if [ ! -f $saved_session ]; then
|
if [ ! -f $saved_session ]; then
|
||||||
display_message "Saved session not found!"
|
display_message "Saved tmux session not found!"
|
||||||
exit
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +149,7 @@ restore_active_and_alternate_sessions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
if supported_tmux_version_ok; then
|
if supported_tmux_version_ok && check_saved_session_exists; then
|
||||||
check_saved_session_exists
|
|
||||||
restore_all_sessions
|
restore_all_sessions
|
||||||
restore_all_pane_processes
|
restore_all_pane_processes
|
||||||
restore_pane_layout_for_each_window >/dev/null 2>&1
|
restore_pane_layout_for_each_window >/dev/null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user