mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 02:01:13 +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
|
# It is VERY important to have the variables declared WITHIN the function
|
||||||
return '''
|
return '''
|
||||||
{name} () {{
|
{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_CMD=$(
|
||||||
TF_ALIAS={name}
|
thefuck {argument_placeholder} $@
|
||||||
TF_SHELL_ALIASES=$(alias)
|
|
||||||
TF_HISTORY=$TF_HISTORY
|
|
||||||
PYTHONIOENCODING=utf-8
|
|
||||||
thefuck {argument_placeholder} $*
|
|
||||||
) && eval $TF_CMD;
|
) && eval $TF_CMD;
|
||||||
|
unset TF_HISTORY;
|
||||||
|
export PYTHONIOENCODING=$TF_PYTHONIOENCODING;
|
||||||
{alter_history}
|
{alter_history}
|
||||||
}}
|
}}
|
||||||
'''.format(
|
'''.format(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user