raphamorim / rio

A hardware-accelerated GPU terminal emulator focusing to run in desktops and browsers.
https://raphamorim.io/rio
MIT License
3.2k stars 103 forks source link

The behavior of using a complete shell command and a shell command with parameters is inconsistent #533

Open ahaoboy opened 2 weeks ago

ahaoboy commented 2 weeks ago

Similar to https://github.com/raphamorim/rio/issues/531

This works

[shell]
program = "pwsh -nologo"
args = []

This doesn't

[shell]
program = "pwsh"
args = ["-nologo"]

If you start the msys2 command line with a command with parameters, it will exit rio and start a new windows window

# [shell]
# program = "C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -mingw64  -use-full-path -shell fish"
# args =  []

[shell]
program = "C:\\msys64\\msys2_shell.cmd"
args = [
  "-defterm",
  "-here",
  "-no-start",
  "-ucrt64",
  "-use-full-path",
  "-shell",
  "fish",
]

I hope to be able to start the msys2 shell with parameters, so that the behavior will be consistent with the configuration of wt and vscode

raphamorim commented 2 weeks ago

thanks for the issue!

Hmmm, I believe this works on MacOS/Linux/BSD but not Windows and I found out why https://github.com/raphamorim/rio/blob/59aace1437b30418970fcbbc641515e45c126906/teletypewriter/src/windows/mod.rs#L35-L38 , apparently args doesn't do anything 😢 (we would need to concatenate with shell)