From 8ae6548dc06aaae383e17f7f97ab38c3a572df40 Mon Sep 17 00:00:00 2001 From: Derek Wilson Date: Tue, 9 Nov 2021 19:27:30 +0000 Subject: [PATCH] fix: save pipestatus in fish init functions (#3160) --- src/init/starship.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/init/starship.fish b/src/init/starship.fish index a6a16fcc..af107010 100644 --- a/src/init/starship.fish +++ b/src/init/starship.fish @@ -5,11 +5,12 @@ function fish_prompt case '*' set STARSHIP_KEYMAP insert end + set STARSHIP_CMD_PIPESTATUS $pipestatus set STARSHIP_CMD_STATUS $status # Account for changes in variable name between v2.7 and v3.0 set STARSHIP_DURATION "$CMD_DURATION$cmd_duration" set STARSHIP_JOBS (count (jobs -p)) - ::STARSHIP:: prompt --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus=$pipestatus --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS + ::STARSHIP:: prompt --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus=$STARSHIP_CMD_PIPESTATUS --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS end function fish_right_prompt @@ -19,11 +20,12 @@ function fish_right_prompt case '*' set STARSHIP_KEYMAP insert end + set STARSHIP_CMD_PIPESTATUS $pipestatus set STARSHIP_CMD_STATUS $status # Account for changes in variable name between v2.7 and v3.0 set STARSHIP_DURATION "$CMD_DURATION$cmd_duration" set STARSHIP_JOBS (count (jobs -p)) - ::STARSHIP:: prompt --right --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus=$pipestatus --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS + ::STARSHIP:: prompt --right --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus=$STARSHIP_CMD_PIPESTATUS --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS end # Disable virtualenv prompt, it breaks starship