mise
mise copied to clipboard
Windows Support
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.
There is a discussion about this: https://github.com/jdxcode/rtx/discussions/66
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.
modifying the behavior of cd
is not how rtx works for other shells. Please read the readme to understand how it functions.
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
In that case I’ll have to read about how oh-my-posh works, probably a similar approach would be needed for rtx
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
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
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)
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