Comments (8)
Hmm, looks like the latest templates/nushell.txt
does have the correct syntax of def --env
rather than def-env
. Somewhy I'm still getting the wrong generated code from the latest version
from zoxide.
Hmm, looks like the latest
templates/nushell.txt
does have the correct syntax ofdef --env
rather thandef-env
. Somewhy I'm still getting the wrong generated code from the latest version
What you are seeing is a master
, not the latest release of 0.9.2
Line 42 in 1bfcdfa
To solve the issue you have to 1) compile from source (cargo install --git https://github.com/ajeetdsouza/zoxide
), or 2) ask the maintainer to cut a release.
from zoxide.
With @ReallySnazzy fix, I also need to change $rest
to ...$rest
following the error message. Diff
# Jump to a directory using only keywords.
-def-env __zoxide_z [...rest:string] {
+def --env __zoxide_z [...rest:string] {
let arg0 = ($rest | append '~').0
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
$arg0
} else {
- (zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n")
+ (zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n")
}
cd $path
}
# Jump to a directory using interactive search.
-def-env __zoxide_zi [...rest:string] {
- cd $'(zoxide query --interactive -- $rest | str trim -r -c "\n")'
+def --env __zoxide_zi [...rest:string] {
+ cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
}
from zoxide.
Hmm, looks like the latest
templates/nushell.txt
does have the correct syntax ofdef --env
rather thandef-env
. Somewhy I'm still getting the wrong generated code from the latest version
That fixed everything for me! Thank you good sir!
from zoxide.
To be clear for anyone else facing this issue:
If you're using nushell 0.89.0 and inside ~/.zoxide.nu you see def-env, then you can replace the 2 instances of def-env
with def --env
to resolve the "No such file or directory (os error 2)"
from zoxide.
Fixed.
from zoxide.
replacing def-env with def --env works but as soon as I restart the terminal the zoxide.nu file gets overwritten and when I make the file read-only it cant init zoxide
from zoxide.
Please upgrade your version of zoxide.
from zoxide.
Related Issues (20)
- zi/cdi not working on zsh HOT 1
- Add support for kornshell HOT 7
- Conflict between zoxide, zsh-autocomplete, and fzf results in erroneous behavior HOT 2
- Support the `--` command-line argument HOT 4
- Interactive mode (space + tab) doesn't appear to be working on macOS HOT 5
- Interactive expansion doesn't work as expected when it matches a single entry then echos command 3 times HOT 6
- How can I change the shortcuts in zi?
- zoxide: no match found on startup HOT 10
- Possible to get a list of previous dirs by time?
- feasibility integrate with vscode cli(`code`) HOT 3
- unknown option: --keep-right zoxide: fzf returned an error HOT 1
- Unable to initialize zoxide in my zsh HOT 2
- Zoxide with cd alias breaks fish - 'prevd-or-backward-word' & 'nextd-or-forward-word' HOT 2
- eval not found HOT 5
- Unable to install zoxide in arch linux HOT 2
- Arch 'MANJARO' with ZSH and Powerlevel10k PROBLEMS HOT 1
- Help with excluding dirs HOT 2
- z "" should act as z with no arguments (go to home directory) HOT 3
- Feature request: "z . some keywords" to find matches in current directory HOT 2
- New Command Idea: Env
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoxide.