mirror of
https://github.com/starship/starship.git
synced 2025-06-25 04:11:40 +02:00
fix(fish): Emit clear-screen escape sequence only in left prompt (#3588)
This commit is contained in:
parent
e01abaac3b
commit
e9e090e97e
@ -75,7 +75,7 @@ pub fn get_prompt(context: Context) -> String {
|
|||||||
|
|
||||||
// A workaround for a fish bug (see #739,#279). Applying it to all shells
|
// A workaround for a fish bug (see #739,#279). Applying it to all shells
|
||||||
// breaks things (see #808,#824,#834). Should only be printed in fish.
|
// breaks things (see #808,#824,#834). Should only be printed in fish.
|
||||||
if let Shell::Fish = context.shell {
|
if Shell::Fish == context.shell && context.target == Target::Main {
|
||||||
buf.push_str("\x1b[J"); // An ASCII control code to clear screen
|
buf.push_str("\x1b[J"); // An ASCII control code to clear screen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user