-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully support uv completion, if installed
- Loading branch information
1 parent
89a441a
commit 11afeb6
Showing
4 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,3 +56,4 @@ nav: | |
- help_all.md | ||
- deps.md | ||
- install.md | ||
- completions.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Completions | ||
|
||
If you've been using Zsh, you probably have completions already set up, | ||
either manually or with a framework. | ||
|
||
If not, at a minimum you'll want this in your `~/.zshrc`, | ||
somewhere before loading zpy: | ||
|
||
```shell | ||
autoload -Uz compinit && compinit | ||
``` | ||
|
||
Some functions allow you to pass arguments through to other tools, | ||
like `pip`, `pip-compile`, and `uv`. | ||
Completion will work for those if you install their own completion definitions. | ||
|
||
If using `uv`, neither `pip` nor `pip-compile` will be relevant. | ||
|
||
``uv`` completion can be installed with something like the following, | ||
depending on your `$fpath`: | ||
|
||
```console | ||
% uv generate-shell-completion zsh >~/.local/share/zsh/site-functions/_uv | ||
``` | ||
|
||
You can check for appropriate folders with: | ||
|
||
```console | ||
% print -rl -- $fpath | ||
``` | ||
|
||
Filter to .../username/... paths for the most likely candidates: | ||
|
||
```console | ||
% print -rl -- ${(M)fpath:#*/$USER/*} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters