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?
- X-seq: zsh-users 27598
- From: Frank Schwidom <schwidom@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>, Mikael Magnusson <mikachu@xxxxxxxxx>, Frank Schwidom <schwidom@xxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Hi, can someone help me to convert my bash PS1 to zsh?
- Date: Tue, 22 Mar 2022 01:36:48 +0100
- Archived-at: <https://zsh.org/users/27598>
- In-reply-to: <CAH+w=7bsS6Hh7n3M9ZCBtVjcjGk+3W16FpYJc-7n1ChSDCys5w@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <20220321160650.GA1727@debian64> <CAHYJk3S7XHDf98D3qCeC0bwmD3KqXqr52pX1xwm8Nnr=OFr1sg@mail.gmail.com> <20220321174741.GB1727@debian64> <CAHYJk3Tnu4aDbZ0PYnsda33uEJkdyxAPbZmbRC1vSezoTQuBUQ@mail.gmail.com> <CAN=4vMpYpDJBH-KbYoaiNMaHpp1R6V2U9dQePKkNYTY61Ldk+Q@mail.gmail.com> <CAH+w=7bsS6Hh7n3M9ZCBtVjcjGk+3W16FpYJc-7n1ChSDCys5w@mail.gmail.com>
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