From ed6fb9b5239a7112e9daf82234a237994dc219a6 Mon Sep 17 00:00:00 2001 From: Dmitry Motylev Date: Wed, 10 Jun 2015 22:33:52 +0100 Subject: [PATCH] try to treat inline strategy as alias for strategy if strategy with that name exists apply it otherwise use it as inline strategy Closes #88 --- scripts/process_restore_helpers.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/process_restore_helpers.sh b/scripts/process_restore_helpers.sh index ef80099..98dda6c 100644 --- a/scripts/process_restore_helpers.sh +++ b/scripts/process_restore_helpers.sh @@ -20,6 +20,11 @@ restore_pane_process() { local inline_strategy="$(_get_inline_strategy "$pane_full_command")" # might not be defined if [ -n "$inline_strategy" ]; then # inline strategy exists + # check for additional "expansion" of inline strategy, e.g. `vim` to `vim -S` + if _strategy_exists "$inline_strategy"; then + local strategy_file="$(_get_strategy_file "$inline_strategy")" + local inline_strategy="$($strategy_file "$pane_full_command" "$dir")" + fi tmux send-keys "$inline_strategy" "C-m" elif _strategy_exists "$pane_full_command"; then local strategy_file="$(_get_strategy_file "$pane_full_command")"