mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-19 04:21:14 +00:00
#398: Add PYTHONIOENCODING=utf-8
to shell aliases
This commit is contained in:
parent
acd0b3e024
commit
1bb04b41eb
@ -36,7 +36,8 @@ class Generic(object):
|
||||
return command_script
|
||||
|
||||
def app_alias(self, fuck):
|
||||
return "alias {0}='TF_ALIAS={0} eval $(thefuck $(fc -ln -1))'".format(fuck)
|
||||
return "alias {0}='TF_ALIAS={0} PYTHONIOENCODING=utf-8 " \
|
||||
"eval $(thefuck $(fc -ln -1))'".format(fuck)
|
||||
|
||||
def _get_history_file_name(self):
|
||||
return ''
|
||||
@ -94,7 +95,8 @@ class Generic(object):
|
||||
|
||||
class Bash(Generic):
|
||||
def app_alias(self, fuck):
|
||||
return "TF_ALIAS={0} alias {0}='eval $(thefuck $(fc -ln -1));" \
|
||||
return "TF_ALIAS={0} alias {0}='PYTHONIOENCODING=utf-8 " \
|
||||
"eval $(thefuck $(fc -ln -1));" \
|
||||
" history -r'".format(fuck)
|
||||
|
||||
def _parse_alias(self, alias):
|
||||
@ -192,7 +194,8 @@ class Fish(Generic):
|
||||
class Zsh(Generic):
|
||||
def app_alias(self, fuck):
|
||||
return "TF_ALIAS={0}" \
|
||||
" alias {0}='eval $(thefuck $(fc -ln -1 | tail -n 1));" \
|
||||
" alias {0}='PYTHONIOENCODING=utf-8 " \
|
||||
"eval $(thefuck $(fc -ln -1 | tail -n 1));" \
|
||||
" fc -R'".format(fuck)
|
||||
|
||||
def _parse_alias(self, alias):
|
||||
|
Loading…
x
Reference in New Issue
Block a user