zoxide
zoxide copied to clipboard
Nushell breaking change (0.68 module/env-var changes)
Nushell is changing the way modules and env-vars work, which predictably shatters Zoxide's init script.
Currently there's a bug which breaks all source-env imports, so no sense jumping on this at the moment (nushell/nushell#6510), but when complete you'll need to do something like :
export-envs {
let-env abcd = wxyz
}
export def-env efgh [] {
let ijkl
}
export alias z = __zoxide_z
and then import all this with use ~/path/to/zoxide.nu *.
zoxide.nu will now be a module, so the * imports all exported functions under it. Alternatively you could embrace this structure and preface all command calls with the module name (i.e. zoxide __zoxide_z"), although I'm really struggling to understand how Nushell is going to differentiate between modules and executables so whatever you do, test the hell out of it 😄.
Hey, thanks for the heads up! I'll fix it once a new Nushell binary is released.
Tracking this issue here: https://github.com/nushell/nushell/issues/6571
Is this still blocked? Nu 0.69 was on September 28 and we're currently on 0.70.
Afaik, the Nushell team still hasn't implemented a full replacement for source, so yes.
Closing this, since the Nushell team doesn't appear to be replacing the source command any time soon.