Skip to content

Commit 861a997

Browse files
authored
1 parent 9ec9b2c commit 861a997

File tree

2 files changed

+3894
-0
lines changed

2 files changed

+3894
-0
lines changed

custom-completions/uv/README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# uv completions
2+
3+
[uv](https://docs.astral.sh/uv/) is a Python package and project manager, known for its speed.
4+
5+
Though `uv` can generate its Nu completion script via `uv generate-shell-completion`, this script can only
6+
provide static choices, not dynamic choices from _pyproject.toml_ file.
7+
8+
## Install completion script
9+
10+
First, if you installed the script generated by `uv generate-shell-completion`, please remove it to avoid conflict.
11+
12+
### Method 1: Use from Git repo
13+
14+
- `git clone https://github.com/nushell/nu_scripts.git`
15+
16+
- Add this to `$nu.config-path` file.
17+
18+
```nu
19+
source repo/custom-completions/uv/uv-completions.nu
20+
```
21+
22+
### Method 2: Selectively copy
23+
24+
25+
- Copy the _uv-completions.nu_ to Nu standard place.
26+
27+
```nu
28+
cp custom-completions/uv/uv-completions.nu ($nu.data-dir | path join 'completions')
29+
```
30+
31+
- Open `$nu.config-path` file and add this:
32+
33+
```nu
34+
source uv-completions.nu
35+
```

0 commit comments

Comments
 (0)