mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
parent
732d53cede
commit
81ed0811b4
@ -4,6 +4,7 @@
|
||||
- saving a new session does not remove the previous one
|
||||
- make the directory where sessions are stored configurable
|
||||
- support only Tmux v1.9 or greater
|
||||
- display a nice error message if saved session file does not exist
|
||||
|
||||
### v0.0.1, 2014-08-26
|
||||
- started a project
|
||||
|
@ -4,6 +4,14 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
source "$CURRENT_DIR/helpers.sh"
|
||||
|
||||
check_saved_session_exists() {
|
||||
local saved_session="$(last_session_path)"
|
||||
if [ ! -f $saved_session ]; then
|
||||
display_message "Saved session not found!"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
window_exists() {
|
||||
local session_name="$1"
|
||||
local window_number="$2"
|
||||
@ -76,6 +84,7 @@ restore_all_sessions() {
|
||||
|
||||
main() {
|
||||
if supported_tmux_version_ok; then
|
||||
check_saved_session_exists
|
||||
restore_all_sessions
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user