浏览代码

Merge pull request #4234 from mcornella/fix-fbterm-autostart

Fix fbterm autostart
Robby Russell 9 年之前
父节点
当前提交
1605d8264c
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      plugins/fbterm/fbterm.plugin.zsh

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

@@ -1,6 +1,7 @@
 # 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