#738: Set SHELL env var for fish and tcsh

This commit is contained in:
Pablo Santiago Blum de Aguiar
2017-12-16 22:46:44 -02:00
parent f700b23f57
commit bcb749722b
4 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ class Fish(Generic):
# It is VERY important to have the variables declared WITHIN the alias
return ('function {0} -d "Correct your previous console command"\n'
' set -l fucked_up_command $history[1]\n'
' env TF_ALIAS={0} PYTHONIOENCODING=utf-8'
' env TF_SHELL=fish TF_ALIAS={0} PYTHONIOENCODING=utf-8'
' thefuck $fucked_up_command | read -l unfucked_command\n'
' if [ "$unfucked_command" != "" ]\n'
' eval $unfucked_command\n{1}'
+1 -1
View File
@@ -7,7 +7,7 @@ from .generic import Generic
class Tcsh(Generic):
def app_alias(self, alias_name):
return ("alias {0} 'setenv TF_ALIAS {0} && "
return ("alias {0} 'setenv TF_SHELL tcsh && setenv TF_ALIAS {0} && "
"set fucked_cmd=`history -h 2 | head -n 1` && "
"eval `thefuck ${{fucked_cmd}}`'").format(alias_name)