vscode-runme icon indicating copy to clipboard operation
vscode-runme copied to clipboard

Multiple shells / Shell detection

Open mxsdev opened this issue 2 years ago • 0 comments

Currently, we try to determine what shell to execute in based on the SHELL environment variable. This causes a few issues:

  • We cannot have different scripts execute in different shells, e.g. based on the language of the fenced code block
  • SHELL is not necessarily set on Windows, so this is a significant hurdle for windows support

VSCode internally has a list of TerminalProviders which can be provided by extensions. We should:

  • Tap into this if possible
  • If not, develop a solution to detect shells on the host's system, ideally leveraging existing solutions/libraries

With this information, we can:

  • Give user the option to select a shell profile to run a command block in
  • Try to make a best guess for which shell to use by default (using language, user's preferred shell, etc)
  • Use gRPC runner on Windows

For windows support, runme will need to implement support for powershell and DOS. This should not be that difficult, see stateful/runme#173

mxsdev avatar Mar 17 '23 18:03 mxsdev