ajeetdsouza / zoxide

A smarter cd command. Supports all major shells.
https://crates.io/crates/zoxide
MIT License
23.13k stars 555 forks source link

nushell(0.99.1) can't load zoxide #934

Closed seocamo closed 2 weeks ago

seocamo commented 2 weeks ago

i am trying out nushell on arch linux(btw), and the file zoxide make with the init command start with a if and that is not allow only def, const, extern, alias, use, module, export or export-env is allow

so i think it need to wrap in a module or something.

Error: nu::parser::expected_keyword

  × Expected keyword.
    ╭─[~/.cache/zoxide/zoxide.nu:9:1]
  8 │ # Initialize hook to add new entries to the database.
  9 │ if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) {
    · ─┬
    ·  ╰── expected def, const, extern, alias, use, module, export or export-env keyword
 10 │   $env.__zoxide_hooked = true
    ╰────
ajeetdsouza commented 2 weeks ago

Have you followed the initialization instructions in the README exactly, or have you changed something there?

seocamo commented 2 weeks ago

ohh i try to delete what i added and retype it. and i typed use and not source sorry it is my bad