You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
When attempting to access the last command in a fish_prompt-event-driven function: it gets the second to last command instead. This makes abbreviating "!!" not work properly.
Steps to Reproduce:
Place the following in ~/.config/fish/config.fish
function-e fish_prompt onprompt
set -U fish_user_abbreviations "!!=$history[1]"
end
Then try typing !!, followed by a space. Then witness that instead of being replaced by the last command, !! is replaced by the second-to-last command.
Additional Information:
I'm guessing the fish_prompt event is launched before the variable $history is updated.
The text was updated successfully, but these errors were encountered:
Description:
When attempting to access the last command in a fish_prompt-event-driven function: it gets the second to last command instead. This makes abbreviating "!!" not work properly.
Steps to Reproduce:
Place the following in ~/.config/fish/config.fish
Then try typing !!, followed by a space. Then witness that instead of being replaced by the last command, !! is replaced by the second-to-last command.
Additional Information:
I'm guessing the fish_prompt event is launched before the variable $history is updated.
The text was updated successfully, but these errors were encountered: