Skip to content

Commit 88c1a9e

Browse files
committed
add zoxide custom completions
1 parent 698e240 commit 88c1a9e

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

custom-completions/bat/bat-completions.nu

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# A cat(1) clone with syntax highlighting and Git integration
22
export extern "bat" [
3-
...file: path # file to print / concatenate
3+
...file: path # file(s) to print / concatenate
44
--help # Print help (see a summary with '-h')
55
-h # Print help (see more with '--help')
66
--version # Print version

custom-completions/zoxide/RAEDME.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# pytest completions
2+
3+
Completions for [zoxide](https://github.com/ajeetdsouza/zoxide). ``zoxide`` is a smarter cd command, inspired by z and autojump. It remembers which directories you use most frequently, so you can "jump" to them in just a few keystrokes. zoxide works on all major shells.
4+
5+
## Usage
6+
7+
```nushell
8+
use zoxide-completions.nu *
9+
```
10+
or
11+
```nushell
12+
source zoxide-completions.nu
13+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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

Comments
 (0)