zoxide icon indicating copy to clipboard operation
zoxide copied to clipboard

templates/nushell.txt: Alias name not supported

Open brian6932 opened this issue 1 year ago • 2 comments

Error: nu::parser::variable_not_valid

  × Alias name not supported.
    ╭─[/root/.zoxide.nu:69:1]
 69 │
 70 │ alias {{cmd}} = __zoxide_z
    ·       ───┬───
    ·          ╰── alias name can't be a number, a filesize, or contain a hash # or caret ^
 71 │ alias {{cmd}}i = __zoxide_zi
    ╰────

~> nu -v
0.87.1

brian6932 avatar Nov 27 '23 07:11 brian6932

Have you followed the installation instructions listed on the README?

ajeetdsouza avatar Nov 27 '23 07:11 ajeetdsouza

I have, I fixed this issue by just changing the lines to

alias z = __zoxide_z
alias zi = __zoxide_zi

I had to use the file from the repo, instead of using the installation directions, as the installation directions result in #630 and I don't want to see that everytime I launch my shell :)

brian6932 avatar Nov 27 '23 08:11 brian6932

The file in the repo is a template - {{cmd}} would be replaced with z when running zoxide init.

I'm cutting a release of zoxide, the problem should be fixed now.

ajeetdsouza avatar Feb 12 '24 22:02 ajeetdsouza