Skip to content

Commit

Permalink
setup: get status code before copying prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
joshi4 committed Sep 17, 2024
1 parent 83b7fb6 commit 7d04940
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/setup/savvy.fish
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ function __savvy_modify_prompt --description "Modify prompt for Savvy recording"
# Define new fish_prompt function
function fish_prompt
# Call the original prompt function
set -l original_prompt (__original_fish_prompt)
set -l exit_code $status
set -l original_prompt (__original_fish_prompt)

if test "$SAVVY_CONTEXT" = "record"
and not string match -q '*recording*' "$fish_prompt"
echo -n $original_prompt
Expand Down Expand Up @@ -65,7 +66,7 @@ function __savvy_record_pre_exec__ --on-event fish_postexec
#set -l clean_prompt (string replace -ra '\e\[[^m]*m' "" -- $prompt)

# Send command to savvy and get step_id
#savvy send --prompt="$clean_prompt" $cmd
#savvy send --prompt="$clean_prompt" $cmd
set -g step_id (
env SAVVY_SOCKET_PATH=$SAVVY_INPUT_FILE \
savvy send $cmd
Expand Down

0 comments on commit 7d04940

Please sign in to comment.