Browse Source

Check if fbterm is installed and use $TTY variable

Marc Cornellà 8 years ago
parent
commit
be5dcb8a59
1 changed files with 5 additions and 3 deletions
  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