#738: Set SHELL env var for fish and tcsh
This commit is contained in:
@@ -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}'
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user