From 92bf53f1aee03a09991e112a0f291fdc9d7f5908 Mon Sep 17 00:00:00 2001 From: Haakon Meihack Date: Tue, 29 Sep 2026 11:23:20 +0200 Subject: [PATCH] fix(emacs): do not emit ANSI escape codes in ghostel (#14145) --- plugins/emacs/emacs.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index 3ed6cee19..8322d5e14 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -35,7 +35,8 @@ alias eeval="$EMACS_PLUGIN_LAUNCHER --eval" alias eframe='emacsclient --alternate-editor="" --create-frame' # Emacs ANSI Term tracking -if [[ -n "$INSIDE_EMACS" ]] && [[ "$INSIDE_EMACS" != "vterm" ]]; then +local excluded_terms=(vterm ghostel) +if [[ -n "$INSIDE_EMACS" ]] && (( ! ${excluded_terms[(Ie)${INSIDE_EMACS%%,*}]} )); then chpwd_emacs() { print -P "\033AnSiTc %d"; } print -P "\033AnSiTc %d" # Track current working directory print -P "\033AnSiTu %n" # Track username