mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 20:11:17 +00:00
Fix a couple small shellcheck errors (#915)
* Fix shellcheck SC2046 Further reading: https://github.com/koalaman/shellcheck/wiki/Sc2046 * Fix shellcheck 2068 Further reading: https://github.com/koalaman/shellcheck/wiki/Sc2068 * Fix syntax error from bad quoting I also used a docstring here because the escaping makes it harder for humans to parse
This commit is contained in:
parent
201c01fc74
commit
70a13406f0
@ -20,8 +20,8 @@ class Bash(Generic):
|
||||
export TF_HISTORY=$(fc -ln -10);
|
||||
export PYTHONIOENCODING=utf-8;
|
||||
TF_CMD=$(
|
||||
thefuck {argument_placeholder} $@
|
||||
) && eval $TF_CMD;
|
||||
thefuck {argument_placeholder} "$@"
|
||||
) && eval "$TF_CMD";
|
||||
unset TF_HISTORY;
|
||||
export PYTHONIOENCODING=$TF_PYTHONIOENCODING;
|
||||
{alter_history}
|
||||
@ -79,7 +79,7 @@ class Bash(Generic):
|
||||
config = 'bash config'
|
||||
|
||||
return self._create_shell_configuration(
|
||||
content=u'eval $(thefuck --alias)',
|
||||
content=u'eval "$(thefuck --alias)"',
|
||||
path=config,
|
||||
reload=u'source {}'.format(config))
|
||||
|
||||
|
@ -34,8 +34,8 @@ class Generic(object):
|
||||
return command_script
|
||||
|
||||
def app_alias(self, alias_name):
|
||||
return "alias {0}='eval $(TF_ALIAS={0} PYTHONIOENCODING=utf-8 " \
|
||||
"thefuck $(fc -ln -1))'".format(alias_name)
|
||||
return """alias {0}='eval "$(TF_ALIAS={0} PYTHONIOENCODING=utf-8 """ \
|
||||
"""thefuck "$(fc -ln -1)")"'""".format(alias_name)
|
||||
|
||||
def instant_mode_alias(self, alias_name):
|
||||
warn("Instant mode not supported by your shell")
|
||||
|
Loading…
x
Reference in New Issue
Block a user