Skip to content

Commit

Permalink
prompt: do not evaluate "PROMPT_COMMAND" for subprompts
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jul 28, 2022
1 parent ad67555 commit 5c0cfde
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ble-edit.sh
Expand Up @@ -1276,10 +1276,12 @@ function ble-edit/prompt/update {
return
fi

if [[ $PROMPT_COMMAND ]]; then
local PS1=$_ble_edit_PS1
ble-edit/prompt/update/eval-prompt_command
_ble_edit_PS1=$PS1
if ((_ble_textarea_panel==0)); then # 補助プロンプトに対しては PROMPT_COMMAND は実行しない
if [[ $PROMPT_COMMAND ]]; then
local PS1=$_ble_edit_PS1
ble-edit/prompt/update/eval-prompt_command
_ble_edit_PS1=$PS1
fi
fi
local ps1=$_ble_edit_PS1

Expand Down

0 comments on commit 5c0cfde

Please sign in to comment.