Update docs
This commit is contained in:
parent
9e06d01e69
commit
3ca116ae6f
|
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Manpages: moved to `man/man1/*.1`.
|
- Manpages: moved to `man/man1/*.1`.
|
||||||
- Fzf: added `--keep-right` option by default, upgraded minimum version to v0.21.0.
|
- Fzf: added `--keep-right` option by default, upgraded minimum version to v0.21.0.
|
||||||
- Bash: only enable completions on 4.4+.
|
- Bash: only enable completions on 4.4+.
|
||||||
|
- Nushell: upgrade minimum supported version to v0.59.0.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
||||||
11
README.md
11
README.md
|
|
@ -190,10 +190,17 @@ zoxide init fish | source
|
||||||
<details>
|
<details>
|
||||||
<summary>Nushell</summary>
|
<summary>Nushell</summary>
|
||||||
|
|
||||||
Add this to your configuration (find it by running `$nu.config-path` in
|
First, generate the Nushell initialization script (you may need to do this
|
||||||
|
whenever you update Nushell):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zoxide init nushell --hook prompt | save ~/.zoxide.nu
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, add this to your configuration (find it by running `$nu.config-path` in
|
||||||
Nushell):
|
Nushell):
|
||||||
|
|
||||||
```text
|
```sh
|
||||||
zoxide init nushell --hook prompt | save ~/.zoxide.nu
|
zoxide init nushell --hook prompt | save ~/.zoxide.nu
|
||||||
source ~/.zoxide.nu
|
source ~/.zoxide.nu
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,14 @@ Add this to your configuration (usually \fB~/.config/fish/config.fish\fR):
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B nushell
|
.B nushell
|
||||||
Add this to your configuration (find it by running \fB$nu.config-path\fR in
|
First, generate the Nushell initialization script (you may need to do this
|
||||||
|
whenever you update Nushell):
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
\fBzoxide init nushell --hook prompt | save ~/.zoxide.nu\fR
|
||||||
|
.fi
|
||||||
|
.sp
|
||||||
|
Now, add this to your configuration (find it by running \fB$nu.config-path\fR in
|
||||||
Nushell):
|
Nushell):
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.nf
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ let-env __zoxide_oldprompt = (if '__zoxide_oldprompt' in (env).name {
|
||||||
|
|
||||||
# Hook to add new entries to the database.
|
# Hook to add new entries to the database.
|
||||||
def __zoxide_hook [] {
|
def __zoxide_hook [] {
|
||||||
zoxide add -- $nu.cwd
|
zoxide add -- $env.PWD
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialize hook.
|
# Initialize hook.
|
||||||
|
|
@ -51,11 +51,11 @@ def-env __zoxide_z [...rest:string] {
|
||||||
let path = if ($rest | length) <= 1 && ($arg0 | path expand | path type) == dir {
|
let path = if ($rest | length) <= 1 && ($arg0 | path expand | path type) == dir {
|
||||||
$arg0
|
$arg0
|
||||||
} else {
|
} else {
|
||||||
(zoxide query --exclude $nu.cwd -- $rest | str trim -r -c (char newline))
|
(zoxide query --exclude $env.PWD -- $rest | str trim -r -c (char newline))
|
||||||
}
|
}
|
||||||
cd $path
|
cd $path
|
||||||
{%- if echo %}
|
{%- if echo %}
|
||||||
echo $nu.cwd
|
echo $env.PWD
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ def-env __zoxide_z [...rest:string] {
|
||||||
def-env __zoxide_zi [...rest:string] {
|
def-env __zoxide_zi [...rest:string] {
|
||||||
cd $'(zoxide query -i -- $rest | str trim -r -c (char newline))'
|
cd $'(zoxide query -i -- $rest | str trim -r -c (char newline))'
|
||||||
{%- if echo %}
|
{%- if echo %}
|
||||||
echo $nu.cwd
|
echo $env.PWD
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -84,8 +84,13 @@ alias {{cmd}}i = __zoxide_zi
|
||||||
{%- endmatch %}
|
{%- endmatch %}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# To initialize zoxide, add this to your configuration (find it by running
|
# To initialize zoxide, first generate the Nushell initialization script (you
|
||||||
# `$nu.config-path` in Nushell):
|
# may need to do this whenever you update Nushell):
|
||||||
|
#
|
||||||
|
# zoxide init nushell --hook prompt | save ~/.zoxide.nu
|
||||||
|
#
|
||||||
|
# Now, add this to your configuration (find it by running `$nu.config-path` in
|
||||||
|
# Nushell):
|
||||||
#
|
#
|
||||||
# zoxide init nushell --hook prompt | save ~/.zoxide.nu
|
# zoxide init nushell --hook prompt | save ~/.zoxide.nu
|
||||||
# source ~/.zoxide.nu
|
# source ~/.zoxide.nu
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue