pull/149/merge
Allex 2023-03-28 07:43:05 +02:00 committed by GitHub
commit 3dad808f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -96,6 +96,9 @@ _proc_matches_full_command() {
return 0
fi
else
# Fix command with absolute path, such as:
# "/usr/bin/vim ~/.tmux.conf" => vim
pane_full_command=`_just_command "$pane_full_command"`
# regex matching the command makes sure process is a "word"
if [[ "$pane_full_command" =~ (^${match} ) ]] || [[ "$pane_full_command" =~ (^${match}$) ]]; then
return 0
@ -187,7 +190,10 @@ _get_command_strategy() {
}
_just_command() {
echo "$1" | cut -d' ' -f1
# Fix command with absolute path, such as:
# "/usr/bin/vim ~/.tmux.conf" => vim
local cmd=`printf "$1"|cut -d' ' -f1`
printf "%s" "${cmd##*/}"
}
_get_strategy_file() {

View File

@ -381,7 +381,6 @@ main() {
cleanup_restored_pane_contents
execute_hook "post-restore-all"
stop_spinner
display_message "Tmux restore complete!"
fi
}
main