@@ -99,30 +99,30 @@ function __vsc_cmd_clear --on-event fish_cancel
99
99
end
100
100
101
101
# Preserve the user' s existing prompt, to wrap in our escape sequences.
102
- function init_vscode_shell_integration --on-event fish_prompt
102
+ function __preserve_fish_prompt --on-event fish_prompt
103
103
if functions --query fish_prompt
104
104
if functions --query __vsc_fish_prompt
105
105
# Erase the fallback so it can be set to the user's prompt
106
106
functions --erase __vsc_fish_prompt
107
107
end
108
108
functions --copy fish_prompt __vsc_fish_prompt
109
- functions --erase init_vscode_shell_integration
109
+ functions --erase __preserve_fish_prompt
110
110
# Now __vsc_fish_prompt is guaranteed to be defined
111
- __set_shell_integration_fish_prompt
111
+ __init_vscode_shell_integration
112
112
else
113
113
if functions --query __vsc_fish_prompt
114
114
# There is no fish_prompt set, so stick with the default
115
- functions --erase init_vscode_shell_integration
115
+ functions --erase __preserve_fish_prompt
116
116
# Now __vsc_fish_prompt is guaranteed to be defined
117
- __set_shell_integration_fish_prompt
117
+ __init_vscode_shell_integration
118
118
else
119
119
function __vsc_fish_prompt
120
120
echo -n (whoami)@(prompt_hostname) (prompt_pwd ) ' ~> '
121
121
end
122
122
end
123
123
end
124
124
end
125
- init_vscode_shell_integration
125
+ __preserve_fish_prompt
126
126
127
127
# Sent whenever a new fish prompt is about to be displayed.
128
128
# Updates the current working directory.
157
157
# Preserve and wrap fish_mode_prompt (which appears to the left of the regular
158
158
# prompt), but only if it's not defined as an empty function (which is the
159
159
# officially documented way to disable that feature).
160
- function __set_shell_integration_fish_prompt
160
+ function __init_vscode_shell_integration
161
161
if __vsc_fish_has_mode_prompt
162
162
functions --copy fish_mode_prompt __vsc_fish_mode_prompt
163
163
0 commit comments