Skip to content

Commit c618245

Browse files
committed
format
1 parent 7e38939 commit c618245

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

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

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,27 @@ end
100100
101101
# Preserve the user's existing prompt, to wrap in our escape sequences.
102102
function __preserve_fish_prompt --on-event fish_prompt
103-
if functions --query fish_prompt
104-
if functions --query __vsc_fish_prompt
105-
# Erase the fallback so it can be set to the user's prompt
106-
functions --erase __vsc_fish_prompt
107-
end
108-
functions --copy fish_prompt __vsc_fish_prompt
109-
functions --erase __preserve_fish_prompt
110-
# Now __vsc_fish_prompt is guaranteed to be defined
111-
__init_vscode_shell_integration
112-
else
113-
if functions --query __vsc_fish_prompt
114-
# There is no fish_prompt set, so stick with the default
115-
functions --erase __preserve_fish_prompt
116-
# Now __vsc_fish_prompt is guaranteed to be defined
117-
__init_vscode_shell_integration
118-
else
119-
function __vsc_fish_prompt
120-
echo -n (whoami)@(prompt_hostname) (prompt_pwd) '~> '
121-
end
122-
end
123-
end
103+
if functions --query fish_prompt
104+
if functions --query __vsc_fish_prompt
105+
# Erase the fallback so it can be set to the user's prompt
106+
functions --erase __vsc_fish_prompt
107+
end
108+
functions --copy fish_prompt __vsc_fish_prompt
109+
functions --erase __preserve_fish_prompt
110+
# Now __vsc_fish_prompt is guaranteed to be defined
111+
__init_vscode_shell_integration
112+
else
113+
if functions --query __vsc_fish_prompt
114+
# There is no fish_prompt set, so stick with the default
115+
functions --erase __preserve_fish_prompt
116+
# Now __vsc_fish_prompt is guaranteed to be defined
117+
__init_vscode_shell_integration
118+
else
119+
function __vsc_fish_prompt
120+
echo -n (whoami)@(prompt_hostname) (prompt_pwd) '~> '
121+
end
122+
end
123+
end
124124
end
125125
__preserve_fish_prompt
126126

@@ -158,24 +158,24 @@ end
158158
# prompt), but only if it's not defined as an empty function (which is the
159159
# officially documented way to disable that feature).
160160
function __init_vscode_shell_integration
161-
if __vsc_fish_has_mode_prompt
162-
functions --copy fish_mode_prompt __vsc_fish_mode_prompt
163-
164-
function fish_mode_prompt
165-
__vsc_fish_prompt_start
166-
__vsc_fish_mode_prompt
167-
end
168-
169-
function fish_prompt
170-
__vsc_fish_prompt
171-
__vsc_fish_cmd_start
172-
end
173-
else
174-
# No fish_mode_prompt, so put everything in fish_prompt.
175-
function fish_prompt
176-
__vsc_fish_prompt_start
177-
__vsc_fish_prompt
178-
__vsc_fish_cmd_start
179-
end
180-
end
161+
if __vsc_fish_has_mode_prompt
162+
functions --copy fish_mode_prompt __vsc_fish_mode_prompt
163+
164+
function fish_mode_prompt
165+
__vsc_fish_prompt_start
166+
__vsc_fish_mode_prompt
167+
end
168+
169+
function fish_prompt
170+
__vsc_fish_prompt
171+
__vsc_fish_cmd_start
172+
end
173+
else
174+
# No fish_mode_prompt, so put everything in fish_prompt.
175+
function fish_prompt
176+
__vsc_fish_prompt_start
177+
__vsc_fish_prompt
178+
__vsc_fish_cmd_start
179+
end
180+
end
181181
end

0 commit comments

Comments
 (0)