* Added new function for the default prompt mode
Now fish mode prompt will call fish_default_mode_prompt, this will solve #3641
* Added function description
* Change wording for documentation about default mode prompt
* Finish changes requested in code review
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
The changes related to issue #3068 removed most of the emacs bindings
from vi mode. However, since fish 2.4.0 was released several people have
pointed out that the directions for reinstating the legacy hybrid key
bindings don't work. This change fixes that and makes it easier to use
the legacy hybrid bindings.
Fixes#3556
This makes fish_mode_prompt rely on $fish_key_bindings instead.
fish_bind_mode is also set in default mode (only always "default"), so
it can't be used as the indicator.
Add a new function fish_mode_prompt which (if it is defined) has its output
prepended to the left prompt. Rather than replacing the prompt wholesale, make
fish_vi_mode enable this function by setting a variable __fish_vi_mode. This
enables vi mode to interoperate nicely with custom prompts. Users who want
to change how the mode is reported can either redefine this function or
erase it entirely. Fixes#1988.