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
pull/74/merge
Dmitry Motylev 2015-06-10 22:33:52 +01:00 committed by Bruno Sutic
parent 8af7aed9b3
commit ed6fb9b523
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
1 changed files with 5 additions and 0 deletions

View File

@ -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")"