nu_scripts icon indicating copy to clipboard operation
nu_scripts copied to clipboard

zoxide: Error: nu::shell::access_beyond_end (link)

Open azzamsa opened this issue 2 years ago • 4 comments

❯ z
Error: nu::shell::access_beyond_end (link)

  × Row number too large (max: 0).
    ╭─[~/code/forks/nu_scripts/prompt/zoxide-eq.nu:86:1]
 86 │         # } else {
 87 │             cd (zoxide query --exclude ($env.PWD) -- $rest.0 | str collect | str trim)
    ·                                                            ┬
    ·                                                            ╰── index too large (max: 0)
 88 │         # }
    ╰────

azzamsa avatar Aug 16 '22 00:08 azzamsa

~~Seems like you're calling a command without arguments.~~

~~Could you please provide more details, the exact reproduction steps, and fill in the issue template? We can't do much with this error report.~~

Edit: Sorry, I thought this issue is on the main Nushell repo. Seems like that command just needs a check for empty args.

@fdncred Is this script supposed to be used for zoxide integration? I thought zoxide had their own setup.

kubouch avatar Aug 16 '22 07:08 kubouch

~~It is included in their setup guide https://github.com/ajeetdsouza/zoxide#step-2-add-zoxide-to-your-shell. However, unlike other shell. z can't be accessed until we use use ~/code/forks/nu_scripts/prompt/zoxide-eq.nu [z, zi] .~~


I did a typo, so that it doesn't work. Yes, it is now works out of the box. We can drop nu_scripts/prompt/zoxide-eq.nu safely.

azzamsa avatar Aug 16 '22 09:08 azzamsa

Added a fix too https://github.com/ajeetdsouza/zoxide/pull/442

azzamsa avatar Aug 16 '22 09:08 azzamsa

@kubouch we used it early on before zoxide supported engine-q. We should get rid of this zoxide-eq.nu file.

fdncred avatar Aug 16 '22 11:08 fdncred

@fdncred PR sent https://github.com/nushell/nu_scripts/pull/278

azzamsa avatar Aug 18 '22 06:08 azzamsa