Skip to content

Commit 51a1377

Browse files
committed
try something else
1 parent fc397e0 commit 51a1377

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/vs/workbench/contrib/terminal/browser/media/fish_xdg_data/fish/vendor_conf.d/shellIntegration.fish

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,20 @@ end
100100
101101
# Preserve the user's existing prompt, to wrap in our escape sequences.
102102
function init_vscode_shell_integration
103-
echo "$fish_prompt"
104103
functions --copy fish_prompt __vsc_fish_prompt
104+
functions --erase init_vscode_shell_integration
105105
end
106106

107107
# Sent whenever a new fish prompt is about to be displayed.
108108
# Updates the current working directory.
109109
function __vsc_update_cwd --on-event fish_prompt
110110
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
114117
end
115118
end
116119

@@ -158,6 +161,7 @@ if __vsc_fish_has_mode_prompt
158161
end
159162
__vsc_fish_cmd_start
160163
end
164+
functions --copy fish_prompt __vsc_fish_prompt_og
161165
else
162166
# No fish_mode_prompt, so put everything in fish_prompt.
163167
function fish_prompt
@@ -167,4 +171,5 @@ else
167171
end
168172
__vsc_fish_cmd_start
169173
end
174+
functions --copy fish_prompt __vsc_fish_prompt_og
170175
end

0 commit comments

Comments
 (0)