Fall back to use POSIX SHELL environment variable

This commit is contained in:
pagedown
2022-03-16 01:03:33 +08:00
parent 7160027c14
commit 91a17e3f0c
2 changed files with 6 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ data_dir = shell_integration_dir = ''
request_data = int('REQUEST_DATA')
leading_data = b''
HOME = os.path.expanduser('~')
login_shell = pwd.getpwuid(os.geteuid()).pw_shell or 'sh'
login_shell = pwd.getpwuid(os.geteuid()).pw_shell or os.environ.get('SHELL') or 'sh'
def set_echo(fd, on=False):