Shell integration for fish doesn't work if fish_vi_mode is used
Hi,
As the title says, when you use fish_vi_mode
then the shell integration has a lot of problems: invisible characters, missing input, etc. My guess is that this is because the current fish integration script simply replaces the fish_prompt
function, however, when fish_vi_mode
is enabled, the output of the function fish_mode_prompt
gets prepended to the prompt. I worked around this by putting the following into my config.fish
file:
source ~/.iterm2_shell_integration.fish
function fish_mode_prompt
set -l last_status $status
iterm2_status $last_status
iterm2_prompt_start
sh -c "exit $last_status"
# ... Output current mode
end
function fish_prompt
iterm2_fish_prompt
iterm2_prompt_end
end