#301: Set variables within the alias

Fix #301
This commit is contained in:
Pablo Santiago Blum de Aguiar
2016-03-09 21:58:18 -03:00
parent d92765d5df
commit bb5f6bb705
6 changed files with 25 additions and 7 deletions
+5 -3
View File
@@ -6,9 +6,11 @@ from .generic import Generic
class Bash(Generic):
def app_alias(self, fuck):
alias = "TF_ALIAS={0}" \
" alias {0}='PYTHONIOENCODING=utf-8" \
" TF_CMD=$(TF_SHELL_ALIASES=$(alias) thefuck $(fc -ln -1)) && " \
# It is VERY important to have the variables declared WITHIN the alias
alias = "alias {0}='TF_CMD=$(TF_ALIAS={0}" \
" PYTHONIOENCODING=utf-8" \
" TF_SHELL_ALIASES=$(alias)" \
" thefuck $(fc -ln -1)) &&" \
" eval $TF_CMD".format(fuck)
if settings.alter_history: