-
-
Notifications
You must be signed in to change notification settings - Fork 117
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,
|
@RanolP Just wondering if you've made any headway on this? Would be helpful to me if you have a working version but no worries if not |
Recently I had no times to implement this sry |
This worked for me. the only change I had to do was put it directly in the pre_prompt hook in config.nu instead of appending it. |
I'm currently working on a code change to integrate this into vfox, and I hope to get a pull request created within the next several days. I do have one question at the moment, if anyone can answer... In what kinds of scenarios should I expect |
vfox/internal/shell/clink_vfox.lua Lines 130 to 157 in f24563b
|
Thanks, @jan-bar. I think I have it figured out now. Specifically, I was trying to figure out how to get
To illustrate, see this example running Compared with this example running Anyway, now that I have a better understanding of the purpose and functionality of |
Well, nushell is also a common choice on Windows.
Thanks a lot.
The text was updated successfully, but these errors were encountered: