revert: "perf(fish): Skip unnecessary indirection in starship init fish" (#6326)

Revert "perf(fish): Skip unnecessary indirection in starship init fish (#6253)"

This reverts commit 798f64033f.
This commit is contained in:
David Knaack 2024-10-18 18:19:48 +02:00
parent 8d905e0139
commit 00d927bb20

View File

@ -156,7 +156,11 @@ 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_script(FISH_INIT, &starship.sprint_posix()?), "fish" => print!(
// 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()?