We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be8eeb0 commit fb5da26Copy full SHA for fb5da26
virtualenv_embedded/activate.fish
@@ -50,14 +50,19 @@ if test \( -z $VIRTUAL_ENV_DISABLE_PROMPT \)
50
functions -c fish_prompt _old_fish_prompt
51
52
function fish_prompt
53
+ # Save the current $status, for fish_prompts that display it.
54
+ set -l old_status $status
55
+
56
# Prompt override provided?
57
# If not, just prepend the environment name.
58
if test -n "__VIRTUAL_PROMPT__"
59
printf '%s%s' "__VIRTUAL_PROMPT__" (set_color normal)
60
else
61
printf '%svirtualenv:%s %s%s%s\n' (set_color white) (set_color normal) (set_color -b black white) (basename $VIRTUAL_ENV) (set_color normal)
62
end
-
63
64
+ # Restore the original $status
65
+ source "exit $old_status" | source
66
_old_fish_prompt
67
68
0 commit comments