-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Support nushell for Windows #207
Comments
If you are interested, you can provide a PR. ;) |
btw it seems duplicated with #46 I'm interested in implementing this. What could I do? I've checked other shells' implementation and there's a little magic inside what the implementors should know. My questions:
[1]: it's not complete yet. just sharing purpose. # config.nu
export-env {
$env.__VFOX_SHELL = 'pwsh'; # use dummy shell for not-editing vfox code yet
$env.__VFOX_PID = $nu.pid;
vfox env --cleanup | null
# like mise, we should support edge cases
# seealso(mise's impl): https://github.com/jdx/mise/blob/e6448b335cf99db6fb2bdfd4c3f49ba255c2d8de/src/shell/nushell.rs#L38-L42)
$env.config = (
$env.config |
update hooks.pre_prompt { |old_hooks| old_hooks ++ {
# I parsed pwsh output for a temporal workaround, it could be better.
for entry in (
vfox env -s pwsh | split row "';" | str replace "='" "=" | parse '{name}={value}'
) {
match $entry.name {
'$env:PATH' => {
load-env { Path: ($entry.value | split row ';') };
}
'$env:__VFOX_PREVIOUS_PATHS' => {
load-env { __VFOX_PREVIOUS_PATHS: $entry.value };
}
}
}
}}
)
} |
@RanolP I've got this for Nushell:
end` and util.getOsTypeAndArch: function util:getOsTypeAndArch() |
We can execute cleanup task when vfox/internal/shell/powershell.go Lines 36 to 38 in 9fcc3fb
vfox/internal/shell/clink_vfox.lua Line 118 in 9fcc3fb
Line 29 in 9fcc3fb
Lines 82 to 83 in 9fcc3fb
In 0.5.0,
|
Well, nushell is also a common choice on Windows.
Thanks a lot.
The text was updated successfully, but these errors were encountered: