mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-13 14:33:01 +00:00
perf(fish): Skip unnecessary indirection in starship init fish (#6253)
perf: Skip unnecessary indirection in starship init fish
This commit is contained in:
parent
b4c7cedba0
commit
798f64033f
@ -156,11 +156,7 @@ pub fn init_stub(shell_name: &str) -> io::Result<()> {
|
|||||||
starship.sprint_posix()?
|
starship.sprint_posix()?
|
||||||
),
|
),
|
||||||
"zsh" => print_script(ZSH_INIT, &starship.sprint_posix()?),
|
"zsh" => print_script(ZSH_INIT, &starship.sprint_posix()?),
|
||||||
"fish" => print!(
|
"fish" => print_script(FISH_INIT, &starship.sprint_posix()?),
|
||||||
// Fish does process substitution with pipes and psub instead of bash syntax
|
|
||||||
r#"source ({} init fish --print-full-init | psub)"#,
|
|
||||||
starship.sprint_posix()?
|
|
||||||
),
|
|
||||||
"powershell" => print!(
|
"powershell" => print!(
|
||||||
r#"Invoke-Expression (& {} init powershell --print-full-init | Out-String)"#,
|
r#"Invoke-Expression (& {} init powershell --print-full-init | Out-String)"#,
|
||||||
starship.sprint_pwsh()?
|
starship.sprint_pwsh()?
|
||||||
|
Loading…
Reference in New Issue
Block a user