Remove ‘-‘ from zsh shell on MacOS

This commit is contained in:
Roselyne Chotin-Avot 2017-05-05 12:01:26 +02:00
parent db8e51524f
commit 6c229ce076
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ def guessShell ():
#if os.environ.has_key('SHELL'): return os.environ['SHELL']
psCommand = subprocess.Popen ( ['ps', '-p', str(os.getppid()) ], stdout=subprocess.PIPE )
shell = psCommand.stdout.readlines()[1][:-1].split()[-1]
shell = psCommand.stdout.readlines()[1][:-1].split()[-1].lstrip('-')
whichCommand = subprocess.Popen ( ['which', shell ], stdout=subprocess.PIPE )
shellPath = whichCommand.stdout.readlines()[0][:-1]