mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
parent
87732c1074
commit
c5195f6668
|
@ -61,7 +61,7 @@ func (e *Engine) RPrompt() string {
|
|||
// bash prints this on the same line as the prompt so we need to move the cursor down
|
||||
// in case the prompt spans multiple lines
|
||||
if lineCount > 0 {
|
||||
return terminal.SaveCursorPosition() + strings.Repeat("\n", lineCount) + text + terminal.RestoreCursorPosition()
|
||||
return terminal.SaveCursorPosition() + fmt.Sprintf("\x1b[%bB", lineCount) + text + terminal.RestoreCursorPosition()
|
||||
}
|
||||
|
||||
return text
|
||||
|
|
|
@ -43,6 +43,12 @@ Tells the engine what to do with the block. There are two options:
|
|||
- `rprompt` renders one or more segments aligned to the right of the cursor. Only one `rprompt` block is permitted.
|
||||
Supported on zsh, bash, PowerShell, cmd, nu and fish.
|
||||
|
||||
:::warning bash
|
||||
`rprompt` is not natively supported in bash and comes with one side effect. When you have a multiline prompt,
|
||||
the `rprompt` will not display when your new prompt is drawn at the bottom of the terminal. This is a limitation
|
||||
of bash and not Oh My Posh.
|
||||
:::
|
||||
|
||||
### Newline
|
||||
|
||||
Start the block on a new line - defaults to `false`. For `pwsh` and `cmd` this will not print a newline
|
||||
|
|
Loading…
Reference in a new issue