summaryrefslogtreecommitdiff
path: root/plugins/fbterm
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2015-08-09 21:55:10 +0200
committerMarc Cornellà <marc.cornella@live.com>2015-08-09 21:55:52 +0200
commitbe5dcb8a59c795495318522522b92672886d4a58 (patch)
treebbd80a367c8714181704ed1ae930c55a1243a47c /plugins/fbterm
parent3d5b3430fd9da12f6e33f534e487fe9b18928ac7 (diff)
downloadzsh-be5dcb8a59c795495318522522b92672886d4a58.tar.gz
zsh-be5dcb8a59c795495318522522b92672886d4a58.tar.bz2
zsh-be5dcb8a59c795495318522522b92672886d4a58.zip
Check if fbterm is installed and use $TTY variable
Diffstat (limited to 'plugins/fbterm')
-rw-r--r--plugins/fbterm/fbterm.plugin.zsh8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/fbterm/fbterm.plugin.zsh b/plugins/fbterm/fbterm.plugin.zsh
index 4f0456016..d60f0e27d 100644
--- a/plugins/fbterm/fbterm.plugin.zsh
+++ b/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