Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bash-specific assumption #342

Open
dhirschfeld opened this issue Nov 17, 2020 · 4 comments
Open

Remove bash-specific assumption #342

dhirschfeld opened this issue Nov 17, 2020 · 4 comments

Comments

@dhirschfeld
Copy link
Contributor

In the initialize function -l is unconditionally appended to the shell arguments irrespective of whatever shell it is. Since pwsh is available on linux the logic should be updated to account for this.

https://github.com/jupyter/jupyter_server/blob/e3de58b3be9865e25d653d0f47db8d929440d3ab/jupyter_server/terminal/__init__.py#L18-L27

@dhirschfeld
Copy link
Contributor Author

I think it would also be useful to allow the user to specify whatever arguments they wanted in the SHELL env var and to only append a -l to the default_shell - i.e. something like:

    if os.name == 'nt':
        default_shell = 'powershell.exe'
    else:
        default_shell = f"{which('sh')} -l"

    shell = settings.get(
        'shell_command',
        os.environ.get('SHELL', default_shell).split()
    )

@kevin-bates
Copy link
Member

fyi: jupyter/notebook#5565 is slated for porting to server. We can then amend that to address these items.

@kevin-bates
Copy link
Member

Hi @dhirschfeld - did you want to take a swing at a PR once #343 is merged?

@dhirschfeld
Copy link
Contributor Author

Sorry, I'm completely smashed at the moment. I'll try to get to it in the next couple of weeks so if someone else wants to pick it up before then feel free...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants