File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/vs/workbench/contrib/terminal/browser/media/fish_xdg_data/fish/vendor_conf.d Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -100,17 +100,20 @@ end
100
100
101
101
# Preserve the user' s existing prompt, to wrap in our escape sequences.
102
102
function init_vscode_shell_integration
103
- echo " $fish_prompt "
104
103
functions --copy fish_prompt __vsc_fish_prompt
104
+ functions --erase init_vscode_shell_integration
105
105
end
106
106
107
107
# Sent whenever a new fish prompt is about to be displayed.
108
108
# Updates the current working directory.
109
109
function __vsc_update_cwd --on-event fish_prompt
110
110
if type -q init_vscode_shell_integration
111
- if set -q fish_prompt
112
- init_vscode_shell_integration
113
- functions --erase init_vscode_shell_integration
111
+ if functions -q __vsc_fish_prompt_og fish_prompt
112
+ set func1 (functions -a __vsc_fish_prompt_og)
113
+ set func2 (functions -a fish_prompt )
114
+ if test " $func1 " != " $func2 "
115
+ init_vscode_shell_integration
116
+ end
114
117
end
115
118
end
116
119
@@ -158,6 +161,7 @@ if __vsc_fish_has_mode_prompt
158
161
end
159
162
__vsc_fish_cmd_start
160
163
end
164
+ functions --copy fish_prompt __vsc_fish_prompt_og
161
165
else
162
166
# No fish_mode_prompt, so put everything in fish_prompt.
163
167
function fish_prompt
167
171
end
168
172
__vsc_fish_cmd_start
169
173
end
174
+ functions --copy fish_prompt __vsc_fish_prompt_og
170
175
end
You can’t perform that action at this time.
0 commit comments