mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 20:11:17 +00:00
#620: Fix aliases with zsh
This commit is contained in:
parent
ec37998a10
commit
7532c65c62
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user