Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Hi, can someone help me to convert my bash PS1 to zsh?



On 2022-03-21 14:43:50, Bart Schaefer wrote:
> On Mon, Mar 21, 2022 at 2:14 PM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > vi mode is as simple as `bindkey -v`.
>
> That doesn't automatically include the (ins) indicator in the prompt,
> though, which seemingly the \$ escape in bash does?
>

No, this is the dollar sign. The (ins) and (cmd) flags are provided by the readline library.

The flag appears on the left side of the last line.
I cannot change it.

I guess zsh don't use readline. But it takes over the settings for the vi keybindings after I startet it from bash. I don't know the exact mechanism.

The readline config at the end of /etc/inputrc is:

set editing-mode vi
set completion-prefix-display-length 1
set show-mode-in-prompt on

The variable 'show-mode-in-prompt' is responsible for this flag.

Regards.





Messages sorted by: Reverse Date, Date, Thread, Author