fix: Fixed zoxide setup 69cbfc94
stevedylandev · 2025-06-23 23:22 3 file(s) · +2 −60
nushell/config.nu +1 −0
933 933
934 934
mkdir ($nu.data-dir | path join "vendor/autoload")
935 935
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
936 +
source ~/.zoxide.nu
936 937
source $"($nu.home-path)/.cargo/env.nu"
nushell/env.nu +1 −1
101 101
# source ~/.config/nushell/zoxide.nu
102 102
source ~/.config/nushell/git-completions.nu
103 103
source ~/.cargo/env.nu
104 -
source ~/.config/nushell/zoxide.nu
105 104
106 105
$env.EDITOR = "nvim"
107 106
107 +
zoxide init nushell | save -f ~/.zoxide.nu
108 108
mkdir ~/.cache/starship
109 109
starship init nu | save -f ~/.cache/starship/init.nu
nushell/zoxide.nu (deleted) +0 −59
1 -
# Code generated by zoxide. DO NOT EDIT.
2 -
3 -
# =============================================================================
4 -
#
5 -
# Hook configuration for zoxide.
6 -
#
7 -
8 -
# Initialize hook to add new entries to the database.
9 -
  $env.__zoxide_hooked = true
10 -
  $env.config = ($env | default {} config).config
11 -
  $env.config = ($env.config | default {} hooks)
12 -
  $env.config = ($env.config | update hooks ($env.config.hooks | default {} env_change))
13 -
  $env.config = ($env.config | update hooks.env_change ($env.config.hooks.env_change | default [] PWD))
14 -
  $env.config = ($env.config | update hooks.env_change.PWD ($env.config.hooks.env_change.PWD | append {|_, dir|
15 -
    zoxide add -- $dir
16 -
  }))
17 -
18 -
# =============================================================================
19 -
#
20 -
# When using zoxide with --no-cmd, alias these internal functions as desired.
21 -
#
22 -
23 -
# Jump to a directory using only keywords.
24 -
def --env --wrapped __zoxide_z [...rest:string] {
25 -
  let arg0 = ($rest | append '~').0
26 -
  let arg0_is_dir = (try {$arg0 | path expand | path type}) == 'dir'
27 -
  let path = if (($rest | length) <= 1) and ($arg0 == '-' or $arg0_is_dir) {
28 -
    $arg0
29 -
  } else {
30 -
    (zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n")
31 -
  }
32 -
  cd $path
33 -
}
34 -
35 -
# Jump to a directory using interactive search.
36 -
def --env --wrapped __zoxide_zi [...rest:string] {
37 -
  cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
38 -
}
39 -
40 -
# =============================================================================
41 -
#
42 -
# Commands for zoxide. Disable these using --no-cmd.
43 -
#
44 -
45 -
alias z = __zoxide_z
46 -
alias zi = __zoxide_zi
47 -
48 -
# =============================================================================
49 -
#
50 -
# Add this to your env file (find it by running `$nu.env-path` in Nushell):
51 -
#
52 -
#   zoxide init nushell | save -f ~/.zoxide.nu
53 -
#
54 -
# Now, add this to the end of your config file (find it by running
55 -
# `$nu.config-path` in Nushell):
56 -
#
57 -
#   source ~/.zoxide.nu
58 -
#
59 -
# Note: zoxide only supports Nushell v0.89.0+.