mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
Add completion for uv Python package manager (#1071)
 
This commit is contained in:
parent
9ec9b2c7ab
commit
861a99779d
2 changed files with 3894 additions and 0 deletions
35
custom-completions/uv/README.md
Normal file
35
custom-completions/uv/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# uv completions
|
||||
|
||||
[uv](https://docs.astral.sh/uv/) is a Python package and project manager, known for its speed.
|
||||
|
||||
Though `uv` can generate its Nu completion script via `uv generate-shell-completion`, this script can only
|
||||
provide static choices, not dynamic choices from _pyproject.toml_ file.
|
||||
|
||||
## Install completion script
|
||||
|
||||
First, if you installed the script generated by `uv generate-shell-completion`, please remove it to avoid conflict.
|
||||
|
||||
### Method 1: Use from Git repo
|
||||
|
||||
- `git clone https://github.com/nushell/nu_scripts.git`
|
||||
|
||||
- Add this to `$nu.config-path` file.
|
||||
|
||||
```nu
|
||||
source repo/custom-completions/uv/uv-completions.nu
|
||||
```
|
||||
|
||||
### Method 2: Selectively copy
|
||||
|
||||
|
||||
- Copy the _uv-completions.nu_ to Nu standard place.
|
||||
|
||||
```nu
|
||||
cp custom-completions/uv/uv-completions.nu ($nu.data-dir | path join 'completions')
|
||||
```
|
||||
|
||||
- Open `$nu.config-path` file and add this:
|
||||
|
||||
```nu
|
||||
source uv-completions.nu
|
||||
```
|
3859
custom-completions/uv/uv-completions.nu
Normal file
3859
custom-completions/uv/uv-completions.nu
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue