File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/vs/workbench/contrib/terminal/browser/media Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,6 @@ if [ -z "$VSCODE_SHELL_INTEGRATION" ]; then
37
37
builtin return
38
38
fi
39
39
40
- # Return for complex debug traps to avoid
41
- # issues like https://github.com/microsoft/vscode/issues/157851
42
- if [[ " $( trap -p DEBUG) " =~ .* \[\[ .* ]]; then
43
- builtin return ;
44
- fi
45
-
46
40
# Send the IsWindows property if the environment looks like Windows
47
41
if [[ " $( uname -s) " =~ ^CYGWIN* | MINGW* | MSYS* ]]; then
48
42
builtin printf " \x1b]633;P;IsWindows=True\x07"
@@ -135,7 +129,16 @@ if [[ -n "${bash_preexec_imported:-}" ]]; then
135
129
precmd_functions+=(__vsc_prompt_cmd)
136
130
preexec_functions+=(__vsc_preexec_only)
137
131
else
138
- __vsc_dbg_trap=" $( trap -p DEBUG | cut -d' ' -f3 | tr -d \' ) "
132
+ __vsc_dbg_trap=" $( trap -p DEBUG) "
133
+ if [[ " $__vsc_dbg_trap " =~ .* \[\[ .* ]]; then
134
+ # HACK - is there a better way to do this?
135
+ __vsc_dbg_trap=${__vsc_dbg_trap# ' trap -- ' * }
136
+ __vsc_dbg_trap=${__vsc_dbg_trap% ' DEBUG' }
137
+ __vsc_dbg_trap=${__vsc_dbg_trap# " '" * }
138
+ __vsc_dbg_trap=${__vsc_dbg_trap% " '" }
139
+ else
140
+ __vsc_dbg_trap=" $( trap -p DEBUG | cut -d' ' -f3 | tr -d \' ) "
141
+ fi
139
142
if [[ -z " $__vsc_dbg_trap " ]]; then
140
143
__vsc_preexec_only () {
141
144
if [ " $__vsc_in_command_execution " = " 0" ]; then
You can’t perform that action at this time.
0 commit comments