oh-my-fish / theme-agnoster

MIT License
95 stars 64 forks source link

Simplify and fix right prompt #20

Closed olbrew closed 7 years ago

olbrew commented 8 years ago

The right prompt shows a Vi mode indicator. This commit rewrites it with native fish-shell functions, fixes the coloring issue seen before and adds a new check for the vi mode used from fish v2.3 onward so it is only shown when vi mode is enabled.

This is the follow up pull request as discussed in #19

olbrew commented 8 years ago

@sn0cr can you merge this? Worth noting that the newest stable 2.3.1 fixes an issue with the mode_prompt and therefore it now has to be manually disabled which can easily be done by adding the following to your fish.config:

# Remove builtin vi mode indicator in favour of custom theme
function fish_mode_prompt
end function

I've also added this caveat to the README.

derekstavis commented 8 years ago

Hey @olbrew I will have a look at your pull request and merge if it works for me. Thanks for the ping.

derekstavis commented 8 years ago

The best thing to do if you'd like the theme to automatically remove the left vi indicator is to define an empty fish_mode_prompt function in fish_mode_prompt.fish file.

olbrew commented 8 years ago

@derekstavis That's indeed even better. I've added it to the right prompt. That seems better than creating a new file just for the purpose of defining an empty function. I've also squashed the commits to have a cleaner history.

sn0cr commented 7 years ago

Sorry that I'm replying that late. Are you ready to merge?

olbrew commented 7 years ago

Yep, should be ready to go. I use it myself and it works against the latest version 👍.

sn0cr commented 7 years ago

Thank you very much @olbrew for your contribution and @derekstavis for the help.