|
| 1 | +def "nu-complete zoxide import" [] { |
| 2 | + ["autojump", "z"] |
| 3 | +} |
| 4 | + |
| 5 | +def "nu-complete zoxide shells" [] { |
| 6 | + ["bash", "elvish", "fish", "nushell", "posix", "powershell", "xonsh", "zsh"] |
| 7 | +} |
| 8 | + |
| 9 | +def "nu-complete zoxide hooks" [] { |
| 10 | + ["none", "prompt", "pwd"] |
| 11 | +} |
| 12 | + |
| 13 | +# Add a new directory or increment its rank |
| 14 | +export extern "zoxide add" [ |
| 15 | + ...paths: path |
| 16 | +] |
| 17 | + |
| 18 | +# Edit the database |
| 19 | +export extern "zoxide edit" [ ] |
| 20 | + |
| 21 | +# Import entries from another application |
| 22 | +export extern "zoxide import" [ |
| 23 | + --from: string@"nu-complete zoxide import" # Application to import from |
| 24 | + --merge # Merge into existing database |
| 25 | +] |
| 26 | + |
| 27 | +# Generate shell configuration |
| 28 | +export extern "zoxide init" [ |
| 29 | + shell: string@"nu-complete zoxide shells" |
| 30 | + --no-cmd # Prevents zoxide from defining the `z` and `zi` commands |
| 31 | + --cmd: string # Changes the prefix of the `z` and `zi` commands [default: z] |
| 32 | + --hook: string@"nu-complete zoxide hooks" # Changes how often zoxide increments a directory's score [default: pwd] |
| 33 | +] |
| 34 | + |
| 35 | +# Search for a directory in the database |
| 36 | +export extern "zoxide query" [ |
| 37 | + ...keywords: string |
| 38 | + --all(-a) # Show unavailable directories |
| 39 | + --interactive(-i) # Use interactive selection |
| 40 | + --list(-l) # List all matching directories |
| 41 | + --score(-s) # Print score with results |
| 42 | + --exclude: path # Exclude the current directory |
| 43 | +] |
| 44 | + |
| 45 | +# Remove a directory from the database |
| 46 | +export extern "zoxide remove" [ |
| 47 | + ...paths: path |
| 48 | +] |
| 49 | + |
| 50 | +export extern zoxide [ |
| 51 | + --help(-h) # Print help |
| 52 | + --version(-V) # Print version |
| 53 | +] |
0 commit comments