fix(emacs): do not emit ANSI escape codes in ghostel (#14145)

This commit is contained in:
Haakon Meihack
2026-09-29 11:23:20 +02:00
committed by GitHub
parent 5c4bb4aec5
commit 92bf53f1ae
+2 -1
View File
@@ -35,7 +35,8 @@ alias eeval="$EMACS_PLUGIN_LAUNCHER --eval"
alias eframe='emacsclient --alternate-editor="" --create-frame' alias eframe='emacsclient --alternate-editor="" --create-frame'
# Emacs ANSI Term tracking # 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"; } chpwd_emacs() { print -P "\033AnSiTc %d"; }
print -P "\033AnSiTc %d" # Track current working directory print -P "\033AnSiTc %d" # Track current working directory
print -P "\033AnSiTu %n" # Track username print -P "\033AnSiTu %n" # Track username