From 6f0d1e287d53e489c576a2629b53456c75d1d38c Mon Sep 17 00:00:00 2001 From: Vladimir Iakovlev Date: Mon, 31 Oct 2016 18:52:48 +0100 Subject: [PATCH] #571: Don't put empty string in history in zsh --- thefuck/shells/zsh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/shells/zsh.py b/thefuck/shells/zsh.py index 79ff89ed..3f8bd80c 100644 --- a/thefuck/shells/zsh.py +++ b/thefuck/shells/zsh.py @@ -15,7 +15,7 @@ class Zsh(Generic): " eval $TF_CMD".format(alias_name) if settings.alter_history: - return alias + " ; print -s $TF_CMD'" + return alias + " ; test -n \"$TF_CMD\" && print -s $TF_CMD'" else: return alias + "'"