mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-23 21:18:47 +00:00
_get_command_arguments: make trailing space optional
When pane_full_command has no arguments, the regex doesn't find argv[0] as there is no trailing space. For example, if pane_full_command was "vim" and the restore option was "~Vim->vim *", the command "vim vim" would get executed instead of just "vim". Make the trailing space optional to match having only the command without arguments.
This commit is contained in:
parent
a2ddfb96b9
commit
4941cdb074
@ -121,7 +121,7 @@ _get_command_arguments() {
|
||||
if _proc_starts_with_tildae "$match"; then
|
||||
match="$(remove_first_char "$match")"
|
||||
fi
|
||||
echo "$pane_full_command" | sed "s,^.*${match}[^ ]* ,,"
|
||||
echo "$pane_full_command" | sed "s,^.*${match}[^ ]* *,,"
|
||||
}
|
||||
|
||||
_get_proc_restore_command() {
|
||||
|
Loading…
Reference in New Issue
Block a user