nu: better zoxide integration
will not complain if zoxide missing
This commit is contained in:
parent
ae8c2a006a
commit
021e6670d6
1
src/.config/nushell/.gitignore
vendored
Normal file
1
src/.config/nushell/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
zoxide.nu
|
@ -713,4 +713,5 @@ $env.config = {
|
||||
]
|
||||
}
|
||||
|
||||
source ~/.config/nushell/zoxide.nu
|
||||
const zoxide_conf = "~/.config/nushell/zoxide.nu"
|
||||
source $zoxide_conf
|
||||
|
@ -95,4 +95,6 @@ $env.NU_PLUGIN_DIRS = [
|
||||
# To load from a custom file you can use:
|
||||
# source ($nu.default-config-dir | path join 'custom.nu')
|
||||
|
||||
zoxide init nushell | save -f ~/.config/nushell/zoxide.nu
|
||||
if (which zoxide | length) > 0 {
|
||||
zoxide init nushell | save -f ~/.config/nushell/zoxide.nu
|
||||
}
|
||||
|
6
src/.config/nushell/zoxide.nu
Normal file
6
src/.config/nushell/zoxide.nu
Normal file
@ -0,0 +1,6 @@
|
||||
# DUMMY FILE for systems that do not have zoxide installed
|
||||
|
||||
# nu doesn't like sourcing files conditionally, so we can't just have it ignore if zoxide.nu does not exist
|
||||
# watch issue: https://github.com/nushell/nushell/issues/8214
|
||||
|
||||
# zoxide will overwrite this if it exists
|
Loading…
Reference in New Issue
Block a user