Skip to content

Commit 00d927b

Browse files
committed
revert: "perf(fish): Skip unnecessary indirection in starship init fish" (starship#6326)
Revert "perf(fish): Skip unnecessary indirection in starship init fish (starship#6253)" This reverts commit 798f640.
1 parent 8d905e0 commit 00d927b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/init/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ pub fn init_stub(shell_name: &str) -> io::Result<()> {
156156
starship.sprint_posix()?
157157
),
158158
"zsh" => print_script(ZSH_INIT, &starship.sprint_posix()?),
159-
"fish" => print_script(FISH_INIT, &starship.sprint_posix()?),
159+
"fish" => print!(
160+
// Fish does process substitution with pipes and psub instead of bash syntax
161+
r#"source ({} init fish --print-full-init | psub)"#,
162+
starship.sprint_posix()?
163+
),
160164
"powershell" => print!(
161165
r#"Invoke-Expression (& {} init powershell --print-full-init | Out-String)"#,
162166
starship.sprint_pwsh()?

0 commit comments

Comments
 (0)