'!' always uses the system shell - no way to change it
See original GitHub issueRunning !ls
works perfectly on native Jupyter, but throws a command not found error in VS Code.
However, I am able to run !dir
cmd/PowerShell commands on VS Code as well as native Jupyter.
Is there a way for me to change this setting, such that I ask Jupyter running on VS Code to let me run UNIX commands (which Git Bash/WSL allows)?
Environment data
- VS Code version: 1.54.3
- Jupyter Extension version (available under the Extensions sidebar): v2021.3.684299474
- Python Extension version (available under the Extensions sidebar): v2021.3.680753044
- OS (Windows | Mac | Linux distro) and version: Windows 10.0.19042 Build 19042
- Python and/or Anaconda version: Python 3.6.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Jupyter server running: Local
Expected Output
What I see
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
shell - Why not use "which"? What to use then?
I WANT the path to the executable file name. The fact that ls is a function on my system is the best reason...
Read more >How To Change Shell To Bash in Linux / Unix - nixCraft
Explains how to set or change shell to bash (Bourne-again shell) on a Linux, macOS, FreeBSD, and Unix-like OS using the chsh command....
Read more >Customizing Linux filesystem commands - Red Hat
The simplest way to customize your working terminal environment is by editing its configuration file, which contains your personal shell ...
Read more >Choosing the Shell (GNU make)
Unlike most variables, the variable SHELL is never set from the environment. This is because the SHELL environment variable is used to specify...
Read more >Invoke a System Command - R
On Windows, system does not use a shell and there is a separate function shell which passes command lines to a shell. If...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s an enhancement because it’s behaving as designed. The enhancement would be to support that jupyter config setting so the user could change what shell is used.
Closing this issue as this is how Jupyter works, and we don’t have any plans to provide some functionality that would work differently in VS Code compared to Jupyter, specially when it comes to execution of code against a kernel.
This is something that’s handled natively by the IPython kernel, hence would require changes upstream