call to fish_right_prompt breaks in fish 3.4.1
Closed this issue · 5 comments
I also have this error in fish 3.4.0
The error looks like this:
Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
paulg@MacBookPaul ~/g/fish-async-prompt (master)> source conf.d/__async_prompt.fish
paulg@MacBookPaul ~/g/fish-async-prompt (master)> function fish_right_prompt; echo "test"; end
paulg@MacBookPaul ~/g/fish-async-prompt (master)> fish: Unknown command: fish_right_prompt test
fish:
fish_right_prompt | read -z prompt
^
paulg@MacBookPaul ~/g/fish-async-prompt (master)> test
@PaulGrandperrin Thanks, I reproduced that. But anyway, fish_right_prompt
must be set up before the first prompt is shown for async-prompt to work correctly.
Does it fix the issue that defining fish_right_prompt
in your config.fish?
It does indeed!
I wasn't sure which script should be loaded first, the prompt script (like starship
) or this, so I tried both orders in an interactive shell.
I think it would be nice to explicitly state in the doc that the order doesn't matter (based on my test) and that everything must be loaded before the first prompt to work correctly.
Anyway, thank a lot for this project, it makes starship
useable in big git repos :)
solution for me was to put starship init fish | source
before status is-interactive || exit
in my config file ~/.config/fish/config.fish
. I don't get why this is necessary