mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:04:14 +08:00
handle debug traps with [[ specially (#157544)
* fix #154189 * add comment
This commit is contained in:
parent
ff1d2abb84
commit
9395d5e43f
@ -125,7 +125,14 @@ if [[ -n "${bash_preexec_imported:-}" ]]; then
|
||||
precmd_functions+=(__vsc_prompt_cmd)
|
||||
preexec_functions+=(__vsc_preexec_only)
|
||||
else
|
||||
__vsc_dbg_trap="$(trap -p DEBUG | cut -d' ' -f3 | tr -d \')"
|
||||
__vsc_dbg_trap="$(trap -p DEBUG)"
|
||||
if [[ "$__vsc_db_trap" =~ .*\[\[.* ]]; then
|
||||
#HACK - is there a better way to do this?
|
||||
__vsc_dbg_trap=${__vsc_dbg_trap#'trap -- '*}
|
||||
__vsc_dbg_trap=${__vsc_dbg_trap%'DEBUG'}
|
||||
else
|
||||
__vsc_dbg_trap="$(trap -p DEBUG | cut -d' ' -f3 | tr -d \')"
|
||||
fi
|
||||
if [[ -z "$__vsc_dbg_trap" ]]; then
|
||||
__vsc_preexec_only() {
|
||||
if [ "$__vsc_in_command_execution" = "0" ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user