Feature request: configurable shell for ! commands on Windows (PowerShell support)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Problem
On Windows, commands entered with the ! prefix are always executed through the hard-coded cmd.exe /C. This means commands that are valid in PowerShell or Unix-like shells fail unexpectedly.
Example:
!pwd
This fails because pwd is not a cmd.exe built-in. Starting Jcode from PowerShell or Cygwin does not change the shell used by !. The error text may also be garbled because cmd.exe emits the system code page while Jcode decodes the captured bytes as UTF-8.
The current implementation appears to hard-code cmd.exe in both:
crates/jcode-tui/src/tui/app/input.rscrates/jcode-app-core/src/server/client_actions.rs
Requested behavior
Please make the shell used for ! commands configurable on Windows, with first-class support for PowerShell 7 (pwsh). For example:
[terminal]
input_shell = "pwsh"
input_shell_args = ["-NoLogo", "-NoProfile", "-Command"]
Possible supported values could include cmd, powershell, pwsh, and an absolute shell path such as Cygwin bash.exe. Keeping cmd.exe as the default would preserve backward compatibility.
Expected behavior
!pwdworks whenpwshis configured.- The command inherits the current Jcode working directory.
- stdout, stderr, and the exit code continue to be captured correctly.
- Unicode output is decoded correctly.
- The same configuration applies to local and server-backed sessions.
Environment
- Jcode: v0.61.0 (
c5009da0) - OS: Windows x86_64
- PowerShell 7 is installed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with crates/jcode-tui/src/tui/app/input.rs and crates/jcode-app-core/src/server/client_actions.rs, then trace how terminal configuration is loaded and applied to local and server-backed sessions. Verify configured pwsh execution, working-directory inheritance, stdout/stderr and exit-code capture, and Unicode decoding while preserving cmd.exe as the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, rust, shell
- Domain
- backend, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100