浏览代码

fix(lib): don't error if `INSIDE_EMACS` is not defined (#10443)

Paul Scott 2 年之前
父节点
当前提交
0314604384
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/termsupport.zsh

+ 1 - 1
lib/termsupport.zsh

@@ -10,7 +10,7 @@ function title {
   setopt localoptions nopromptsubst
 
   # Don't set the title if inside emacs, unless using vterm
-  [[ -n "$INSIDE_EMACS" && "$INSIDE_EMACS" != vterm ]] && return
+  [[ -n "${INSIDE_EMACS:-}" && "$INSIDE_EMACS" != vterm ]] && return
 
   # if $2 is unset use $1 as default
   # if it is set and empty, leave it as is