Remove ‘-‘ from zsh shell on MacOS
This commit is contained in:
parent
db8e51524f
commit
6c229ce076
|
@ -147,7 +147,7 @@ def guessShell ():
|
||||||
#if os.environ.has_key('SHELL'): return os.environ['SHELL']
|
#if os.environ.has_key('SHELL'): return os.environ['SHELL']
|
||||||
|
|
||||||
psCommand = subprocess.Popen ( ['ps', '-p', str(os.getppid()) ], stdout=subprocess.PIPE )
|
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 )
|
whichCommand = subprocess.Popen ( ['which', shell ], stdout=subprocess.PIPE )
|
||||||
shellPath = whichCommand.stdout.readlines()[0][:-1]
|
shellPath = whichCommand.stdout.readlines()[0][:-1]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue