From 803e5dbb8464088a8d84509077bf6dce9ac26688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20M=C4=83gheru=C8=99an-Stanciu?= Date: Thu, 9 Jul 2015 17:41:43 +0200 Subject: [PATCH] improved the check for availability --- plugins/fuck/fuck.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/fuck/fuck.plugin.zsh b/plugins/fuck/fuck.plugin.zsh index 1a3b474fc..cbf8c09ce 100644 --- a/plugins/fuck/fuck.plugin.zsh +++ b/plugins/fuck/fuck.plugin.zsh @@ -1,4 +1,4 @@ -if [ $commands[thefuck] ]; then +if [[ -n $commands[thefuck] ]]; then alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R' alias FUCK='fuck' else