be5dcb8a59c795495318522522b92672886d4a58

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Check if fbterm is installed and use $TTY variable

Diff

 1diff --git a/plugins/fbterm/fbterm.plugin.zsh b/plugins/fbterm/fbterm.plugin.zsh
 2index 4f0456016f1bfa70f8a8b9efa5ea3089b5f806c2..d60f0e27dc7b08a0a26d44627e395da5f76029fb 100644
 3--- a/plugins/fbterm/fbterm.plugin.zsh
 4+++ b/plugins/fbterm/fbterm.plugin.zsh
 5@@ -1,6 +1,8 @@
 6 # start fbterm automatically in /dev/tty*
 7 
 8-if [[ $(tty|grep -o '/dev/tty') = /dev/tty ]] ; then
 9-	fbterm
10-	exit
11+if (( ${+commands[fbterm]} )); then
12+	if [[ "$TTY" = /dev/tty* ]] ; then
13+		fbterm
14+		exit
15+	fi
16 fi