1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

#620: Fix aliases with zsh

This commit is contained in:
Vladimir Iakovlev 2017-03-28 11:38:28 +02:00
parent ec37998a10
commit 7532c65c62

View File

@ -11,11 +11,13 @@ class Zsh(Generic):
# It is VERY important to have the variables declared WITHIN the function
return '''
{name} () {{
TF_ALIAS={name};
PYTHONIOENCODING=utf-8;
TF_SHELL_ALIASES=$(alias);
TF_PREVIOUS=$(fc -ln -1 | tail -n 1);
TF_CMD=$(thefuck $TF_PREVIOUS {argument_placeholder} $*) && eval $TF_CMD;
TF_CMD=$(
TF_ALIAS={name}
TF_SHELL_ALIASES=$(alias)
PYTHONIOENCODING=utf-8
thefuck $TF_PREVIOUS {argument_placeholder} $*
) && eval $TF_CMD;
{alter_history}
}}
'''.format(