update minimum nushell version 0.106.0
This commit is contained in:
parent
bdedc2a813
commit
79f5f6671b
|
|
@ -257,7 +257,7 @@ zoxide can be installed in 4 easy steps:
|
|||
> ```
|
||||
>
|
||||
> **Note**
|
||||
> zoxide only supports Nushell v0.89.0+.
|
||||
> zoxide only supports Nushell v0.106.0+.
|
||||
|
||||
</details>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
# Code generated by zoxide. DO NOT EDIT.
|
||||
|
||||
module zoxide_integration {
|
||||
# From version 0.110.0, $nu.home-path has been renamed to $nu.home-dir
|
||||
const homedir = if $nu.home-dir? != null { $nu.home-dir } else { $nu.home-path }
|
||||
|
||||
{{ section }}
|
||||
|
|
@ -18,15 +19,7 @@ module zoxide_integration {
|
|||
# Initialize hook to add new entries to the database.
|
||||
export-env {
|
||||
{%- if hook == InitHook::Prompt %}
|
||||
$env.config = (
|
||||
$env.config?
|
||||
| default {}
|
||||
| upsert hooks { default {} }
|
||||
| upsert hooks.pre_prompt { default [] }
|
||||
)
|
||||
let __zoxide_hooked = (
|
||||
$env.config.hooks.pre_prompt | any { try { get __zoxide_hook } catch { false } }
|
||||
)
|
||||
let __zoxide_hooked = $env.config.hooks.pre_prompt | any { get __zoxide_hook? }
|
||||
if not $__zoxide_hooked {
|
||||
$env.config.hooks.pre_prompt = ($env.config.hooks.pre_prompt | append {
|
||||
__zoxide_hook: true,
|
||||
|
|
@ -34,18 +27,9 @@ module zoxide_integration {
|
|||
})
|
||||
}
|
||||
{%- else if hook == InitHook::Pwd %}
|
||||
$env.config = (
|
||||
$env.config?
|
||||
| default {}
|
||||
| upsert hooks { default {} }
|
||||
| upsert hooks.env_change { default {} }
|
||||
| upsert hooks.env_change.PWD { default [] }
|
||||
)
|
||||
let __zoxide_hooked = (
|
||||
$env.config.hooks.env_change.PWD | any { try { get __zoxide_hook } catch { false } }
|
||||
)
|
||||
let __zoxide_hooked = $env.config.hooks.env_change.PWD? | default [] | any { get __zoxide_hook? }
|
||||
if not $__zoxide_hooked {
|
||||
$env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD | append {
|
||||
$env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD? | append {
|
||||
__zoxide_hook: true,
|
||||
code: {|_, dir| ^zoxide add -- $dir}
|
||||
})
|
||||
|
|
@ -146,4 +130,4 @@ export use zoxide_integration *
|
|||
#
|
||||
# source ~/.zoxide.nu
|
||||
#
|
||||
# Note: zoxide only supports Nushell v0.89.0+.
|
||||
# Note: zoxide only supports Nushell v0.106.0+.
|
||||
|
|
|
|||
Loading…
Reference in New Issue