jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.17k stars 248 forks source link

Windows Support #743

Closed sgarfinkel closed 8 months ago

sgarfinkel commented 1 year ago

Hi! I really love RTX, but wished it had a working Windows version. Since this is a rust project, in theory it can be cross-compiled Windows.

The main issue would probably be getting the hooks to work with PowerShell. https://github.com/Schniz/fnm has a working integration with PowerShell and could be used as inspiration.

jdx commented 1 year ago

There is a discussion about this: https://github.com/jdxcode/rtx/discussions/66

sgarfinkel commented 1 year ago

Interesting thread. I think this is relevant too: https://devblogs.microsoft.com/scripting/proxy-functions-spice-up-your-powershell-core-cmdlets/. I think it’s sufficient if rtx is called anytime someone runs the Set-Location commandlet (cd is an alias for this). RTX could easily proxy that.

jdx commented 1 year ago

modifying the behavior of cd is not how rtx works for other shells. Please read the readme to understand how it functions.

jdx commented 1 year ago

actually reading the readme again I see this isn't clear, I'll fix that. Meanwhile this is the relevant section: https://github.com/jdxcode/rtx#what-does-rtx-activate-do

sgarfinkel commented 1 year ago

In that case I’ll have to read about how oh-my-posh works, probably a similar approach would be needed for rtx

sgarfinkel commented 1 year ago

Seems simple enough: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_prompts?view=powershell-7.3 if I have some time I’ll open a PR

f0ff886f commented 10 months ago

It looks like perhaps the recent support for Powershell in direnv can provide a useful starting point for rtx to support Powershell too: https://github.com/direnv/direnv/pull/1171/files#diff-0ae809380696f548da1b4494718ec87231367232b99ca0c9472021f95645e1d3

jcrben commented 8 months ago

maybe just focus on the git-for-windows bash (https://github.com/git-for-windows) or msys2 bash (https://github.com/msys2) to start? asdf currently doesn't support "git-bash" (see https://github.com/asdf-vm/asdf/issues/450 ) but a lot of tools do so it may take a bunch of work.

note that I haven't tried it in git bash recently but msys2 supports a lot of linux tools w/ a pacman package manager included. git-for-windows bundles msys2 bash I believe (altho some of the tools it includes may be of the mingw variety)

jdx commented 8 months ago

I'm going to direct the conversation to the discussion #66 to try to keep fewer open issues since this isn't something I have any plans to tackle on any timeframe