1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 14:48:49 +00:00

Fix shellcheck SC2046

Further reading: https://github.com/koalaman/shellcheck/wiki/Sc2046
This commit is contained in:
Ryan Delaney 2019-05-18 19:30:56 -07:00
parent 40ab4eb62d
commit 2094601eaa
2 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ class Bash(Generic):
export PYTHONIOENCODING=utf-8;
TF_CMD=$(
thefuck {argument_placeholder} $@
) && eval $TF_CMD;
) && 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))

View File

@ -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")