File tree Expand file tree Collapse file tree
CodeEdit/ShellIntegration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -443,14 +443,27 @@ _install_bash_preexec
443443unset -f _install_bash_preexec
444444
445445# -- BEGIN CODEEDIT CUSTOMIZATIONS --
446+
447+ __codeedit_status=" $? "
448+
446449__codeedit_preexec () {
447- echo -ne " \033]0;${1} \007"
450+ builtin printf " \033]133;C\007"
451+ builtin printf " \033]0;%s\007" " $1 "
448452}
449453
450454__codeedit_precmd () {
451- echo -ne " \033]0;bash\007"
455+ builtin printf " \033]133;D;%s\007" " $? "
456+ builtin printf " \033]0;bash\007"
452457}
453458
454459preexec_functions+=(__codeedit_preexec)
455460precmd_functions+=(__codeedit_precmd)
461+
462+ if [[ " $CE_SHELL_INTEGRATION_DISABLE_PROMPT " == " 1" ]]; then
463+ unset HISTFILE
464+ PROMPT_COMMAND=" echo -n ''"
465+ PS1=" > "
466+ PS2=" "
467+ fi ;
468+
456469# -- END CODEEDIT CUSTOMIZATIONS --
Original file line number Diff line number Diff line change 4747builtin autoload -Uz add-zsh-hook
4848
4949__codeedit_preexec () {
50- echo -n " \033]0;${1} \007"
50+ builtin printf " \033]133;C\007"
51+ builtin printf " \033]0;%s\007" " $1 "
5152}
5253
5354__codeedit_precmd () {
54- echo -n " \033]0;zsh\007"
55+ builtin printf " \033]133;D;%s\007" " $? "
56+ builtin printf " \033]0;zsh\007"
5557}
5658
5759add-zsh-hook preexec __codeedit_preexec
5860add-zsh-hook precmd __codeedit_precmd
5961
62+ if [[ " $CE_SHELL_INTEGRATION_DISABLE_PROMPT " == " 1" ]]; then
63+ unset HISTFILE
64+ PROMPT_COMMAND=" echo -n ''"
65+ PS1=" > "
66+ PS2=" "
67+ fi
68+
6069# Fix ZDOTDIR
6170
6271if [[ $USER_ZDOTDIR != $CE_ZDOTDIR ]]; then
You can’t perform that action at this time.
0 commit comments