Skip to content
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

Bug Report for Zoxide v0.9.2 and Nu v0.87.1: Deprecated Commands #650

Closed
FelixSchausberger opened this issue Nov 30, 2023 · 5 comments
Closed

Comments

@FelixSchausberger
Copy link

Summary:

When using Zoxide version 0.9.2 in conjunction with Nu version 0.87.1, the user encounters deprecated commands, specifically def-env, resulting in error messages. The affected lines are in the file "~/.zoxide.nu" at lines 25 and 36. The error messages suggest using def --env instead.

Steps to Reproduce:

  • Install Zoxide version 0.9.2.
  • Install Nu version 0.87.1.
  • Run a script or command involving Zoxide and Nu.
  • Observe the error messages related to deprecated commands.

Expected Behavior:

The commands should not be deprecated, and users should not encounter errors related to deprecated features.

Actual Behavior:

Users receive error messages indicating the usage of deprecated commands (def-env), which are scheduled to be removed in version 0.88.

Error message:

Error: × Deprecated command
   ╭─[/home/schausberger/.zoxide.nu:25:1]
 25 │ # Jump to a directory using only keywords.
 26 │ def-env __zoxide_z [...rest:string] {
   · ───┬───
   ·    ╰── `def-env` is deprecated and will be removed in 0.88.
 27 │   let arg0 = ($rest | append '~').0
   ╰────
 help: Use `def --env` instead

Error: × Deprecated command
   ╭─[/home/schausberger/.zoxide.nu:36:1]
 36 │ # Jump to a directory using interactive search.
 37 │ def-env __zoxide_zi  [...rest:string] {
   · ───┬───
   ·    ╰── `def-env` is deprecated and will be removed in 0.88.
 38 │   cd $'(zoxide query --interactive -- $rest | str trim -r -c "\n")'
   ╰────
 help: Use `def --env` instead

Environment:

  • Zoxide Version: 0.9.2
  • Nu Version: 0.87.1
  • Operating System: NixOS 23.11
@AndrewKraevskii
Copy link

This is already fixed in #632

@FelixSchausberger
Copy link
Author

Sorry totally oversaw that, thanks!

@lexpierce
Copy link

lexpierce commented Dec 12, 2023

> rg def-env registry/src/index.crates.io-6f17d22bba15001f/zoxide-0.9.2/templates/nushell.txt
42:def-env __zoxide_z [...rest:string] {
56:def-env __zoxide_zi  [...rest:string] {

This didn't make 0.9.2, or the wrong source is on crates.io. nutshell 0.88 released today, and zoxide is now breaking my env.nu, and general shell configuration on launch. Can we get a new release?

@bew
Copy link

bew commented Dec 12, 2023

In the meantime, an alternative is to not dynamically generate the file, and instead generate it once, fix it manually to use the new syntax and only source it in your nushell config

@lexpierce
Copy link

In the meantime, an alternative is to not dynamically generate the file, and instead generate it once, fix it manually to use the new syntax and only source it in your nushell config

Or just comment it out and not use zoxide in my nu sessions as it isn't currently my primary shell (due to things like it's shifting syntax) and wait for a new zoxide dot release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants