mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 12:06:04 +00:00
Fix zsh alias (#733)
This commit is contained in:
parent
10ac1a3b38
commit
97123dbf73
@ -13,14 +13,16 @@ class Zsh(Generic):
|
||||
# It is VERY important to have the variables declared WITHIN the function
|
||||
return '''
|
||||
{name} () {{
|
||||
TF_HISTORY=$(fc -ln -10)
|
||||
TF_PYTHONIOENCODING=$PYTHONIOENCODING;
|
||||
export TF_ALIAS={name};
|
||||
export TF_SHELL_ALIASES=$(alias);
|
||||
export TF_HISTORY="$(fc -ln -10)";
|
||||
export PYTHONIOENCODING=utf-8;
|
||||
TF_CMD=$(
|
||||
TF_ALIAS={name}
|
||||
TF_SHELL_ALIASES=$(alias)
|
||||
TF_HISTORY=$TF_HISTORY
|
||||
PYTHONIOENCODING=utf-8
|
||||
thefuck {argument_placeholder} $*
|
||||
thefuck {argument_placeholder} $@
|
||||
) && eval $TF_CMD;
|
||||
unset TF_HISTORY;
|
||||
export PYTHONIOENCODING=$TF_PYTHONIOENCODING;
|
||||
{alter_history}
|
||||
}}
|
||||
'''.format(
|
||||
|
Loading…
x
Reference in New Issue
Block a user