浏览代码

Check if fbterm is installed and use $TTY variable

Marc Cornellà 8 年之前
父节点
当前提交
be5dcb8a59
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      plugins/fbterm/fbterm.plugin.zsh

+ 5 - 3
plugins/fbterm/fbterm.plugin.zsh

@@ -1,6 +1,8 @@
 # start fbterm automatically in /dev/tty*
 
-if [[ $(tty|grep -o '/dev/tty') = /dev/tty ]] ; then
-	fbterm
-	exit
+if (( ${+commands[fbterm]} )); then
+	if [[ "$TTY" = /dev/tty* ]] ; then
+		fbterm
+		exit
+	fi
 fi