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

Add cd and command args to create terminal command #7605

Closed

Conversation

fcollonval
Copy link
Member

References

Fix #7604

Code changes

Add arguments cd and command to the terminal:create-new command to optionally change the current directory of the terminal and execute a command in it.

User-facing changes

None

Backwards-incompatible changes

None

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@ian-r-rose
Copy link
Member

@fcollonval A very similar functionality was removed in #5916 for security reasons. Commands are deliberately meant to be serialized as JSON and can be distributed, e.g., what we do in state restoration and workspaces. So the rationale in that PR was that allowing arbitrary code execution in command args could result in malicious code being distributed via command args in workspace files.

Note that initialCommand is still a constructor arg for the terminal widget, so extension authors can still use it. It's just currently not available as a command arg.

@fcollonval
Copy link
Member Author

Thanks @ian-r-rose and sorry to miss the mentioned PR. So I open an issue on @jupyterlab/git to do the same.

@fcollonval fcollonval closed this Dec 7, 2019
@fcollonval fcollonval deleted the terminal-execute-cmd branch December 7, 2019 17:13
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Jan 6, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add args to 'terminal:create-new' to change current directory and execute a command
2 participants