From 692ee53a33c76efe4e4a1760e51e23728b91ef85 Mon Sep 17 00:00:00 2001 From: Chris Mendis Date: Mon, 9 Jul 2018 18:48:56 -0400 Subject: [PATCH] Avoid masking shell return values in Zsh.app_alias (#820) I discovered that a common shell script issue (https://github.com/koalaman/shellcheck/wiki/SC2155) is present in the script returned by `Zsh.app_alias()`, amongst other `app_alias` methods in thefuck. In the case of the zsh `app_alias()` script, this common issue is causing the script to error on some versions of Mac OS X. This is reported in #718. Unmasking the value of `TF_SHELL_ALIASES` fixes the errors in Mac OS X, but I also unmasked `TF_HISTORY` for consistency. --- thefuck/shells/zsh.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/thefuck/shells/zsh.py b/thefuck/shells/zsh.py index 5578cad5..e771918a 100644 --- a/thefuck/shells/zsh.py +++ b/thefuck/shells/zsh.py @@ -16,8 +16,10 @@ class Zsh(Generic): TF_PYTHONIOENCODING=$PYTHONIOENCODING; export TF_SHELL=zsh; export TF_ALIAS={name}; - export TF_SHELL_ALIASES=$(alias); - export TF_HISTORY="$(fc -ln -10)"; + TF_SHELL_ALIASES=$(alias); + export TF_SHELL_ALIASES; + TF_HISTORY="$(fc -ln -10)"; + export TF_HISTORY; export PYTHONIOENCODING=utf-8; TF_CMD=$( thefuck {argument_placeholder} $@