0

Is it possible to get the same prompt settings I have in Zsh in Bash?

unset PROMPT
unset RPROMPT
promptinit
PROMPT='>'
RPROMPT='[%F{green}%(5~|%-1~/.../%3~|%4~)%f]'

e.g. my prompt in zsh looks as follows:

>            [/local/.../Downloads/tcl8.5.13/generic]

and disappears when the command I type would collide with the right prompt. (I don't care about any color (it should just differ from my black background))

0

The short answer is yes.

PS1=$(printf "%*s\r%s\n> " "$(tput cols)" 'righty tighty' 'lefty loosey')

But it's a far cry from RPROMPT in zsh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.