Skip to content

Commit d86e54c

Browse files
committed
fix error
1 parent 5e0799a commit d86e54c

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,8 @@ if [[ -z "${bash_preexec_imported:-}" ]]; then
206206
PROMPT_COMMAND=__vsc_prompt_cmd
207207
fi
208208
fi
209-
echo -e "\x1b]633;P;UserAliases=$(alias)"
209+
result=$(alias)
210+
result=$(echo $result | sed 's/\"/\\/g')
211+
result=$(echo $result | sed 's/`n/\x0a/g')
212+
result=$(echo $result | sed 's/;/\x3b/g')
213+
echo -ne "\x1b]633;P;UserAliases=$result"

src/vs/workbench/contrib/terminal/browser/media/shellIntegration-rc.zsh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,8 @@ add-zsh-hook preexec __vsc_preexec
130130
if [[ $options[login] = off && $USER_ZDOTDIR != $VSCODE_ZDOTDIR ]]; then
131131
ZDOTDIR=$USER_ZDOTDIR
132132
fi
133-
echo -e "\x1b]633;P;UserAliases=$(alias)"
133+
result=$(alias)
134+
result=$(echo $result | sed 's/\"/\\/g')
135+
result=$(echo $result | sed 's/`n/\x0a/g')
136+
result=$(echo $result | sed 's/;/\x3b/g')
137+
echo -ne "\x1b]633;P;UserAliases=$result"

src/vs/workbench/contrib/terminal/common/terminal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
1616
import { IMarkProperties, ISerializedCommandDetectionCapability, ITerminalCapabilityStore, IXtermMarker } from 'vs/platform/terminal/common/capabilities/capabilities';
1717
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
1818
import { IProcessDetails } from 'vs/platform/terminal/common/terminalProcess';
19-
import { ITerminalQuickFixProvider, ITerminalCommandSelector, ITerminalOutputMatch, ITerminalOutputMatcher } from 'vs/platform/terminal/common/xterm/terminalQuickFix';
19+
import { ITerminalQuickFixProvider, ITerminalCommandSelector, ITerminalOutputMatch, ITerminalOutputMatcher, ITerminalContributions } from 'vs/platform/terminal/common/xterm/terminalQuickFix';
2020

2121
export const TERMINAL_VIEW_ID = 'terminal';
2222

@@ -725,7 +725,7 @@ export const DEFAULT_COMMANDS_TO_SKIP_SHELL: string[] = [
725725
'workbench.action.toggleMaximizedPanel'
726726
];
727727

728-
export const terminalContributionsDescriptor: IExtensionPointDescriptor = {
728+
export const terminalContributionsDescriptor: IExtensionPointDescriptor<ITerminalContributions> = {
729729
extensionPoint: 'terminal',
730730
defaultExtensionKind: ['workspace'],
731731
jsonSchema: {

0 commit comments

Comments
 (0)