mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
Disable rprompt + handle disabled rprompt case
This commit is contained in:
parent
5301fbffbe
commit
a9557c127e
3 changed files with 21 additions and 9 deletions
6
bash/ext
6
bash/ext
|
|
@ -101,7 +101,11 @@ function apply_prompt_rprompt() {
|
|||
local prompt=$(echo "${PROMPT}" | sub_prompt_colors_sized)
|
||||
#local rprompt=$(echo "${RPROMPT}" | strip_prompt_colors)
|
||||
#local prompt=$(echo "${PROMPT}" | strip_prompt_colors)
|
||||
PS1="$(printf "\[%*s\r\]%s" "${COLUMNS}" "${rprompt:-}" "${prompt:-}")"
|
||||
if [[ -n "${RPROMPT}" ]]; then
|
||||
PS1="$(printf "\[%*s\r\]%s" "${COLUMNS}" "${rprompt:-}" "${prompt:-}")"
|
||||
else
|
||||
PS1="${prompt:-}"
|
||||
fi
|
||||
}
|
||||
|
||||
# vim: ft=bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue