From be5dcb8a59c795495318522522b92672886d4a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 9 Aug 2015 21:55:10 +0200 Subject: [PATCH] Check if fbterm is installed and use $TTY variable --- plugins/fbterm/fbterm.plugin.zsh | 8 +++++--- 1 file 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