1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 18:21:10 +00:00

refact(shells): use os.path.basename to get the name of the shell

Signed-off-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
This commit is contained in:
Pablo Santiago Blum de Aguiar 2015-05-08 20:09:50 -03:00
parent 51800afca8
commit 8d256390a1

View File

@ -136,7 +136,7 @@ def _get_shell():
shell = Process(os.getpid()).parent().cmdline()[0] shell = Process(os.getpid()).parent().cmdline()[0]
except TypeError: except TypeError:
shell = Process(os.getpid()).parent.cmdline[0] shell = Process(os.getpid()).parent.cmdline[0]
return shells[shell] return shells[os.path.basename(shell)]
def from_shell(command): def from_shell(command):