Skip to content

Commit b5ed738

Browse files
committed
docs: Document completion, argparse update
1 parent 01ac07f commit b5ed738

File tree

4 files changed

+102
-2
lines changed

4 files changed

+102
-2
lines changed

CHANGES

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ $ pipx install --suffix=@next 'vcspull' --pip-args '\--pre' --force
1717

1818
## vcspull v1.16.x (unreleased)
1919

20-
- _Add your latest changes from PRs here_
20+
- Notes on upcoming releases will be added here
21+
22+
<!-- Maintainers, insert changes / features for the next release here -->
2123

2224
## vcspull v1.15.2 (2022-10-08)
2325

MIGRATION

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,20 @@ well.
2121

2222
## Next release
2323

24-
_Add migration notes here_
24+
_Notes on the upcoming release will be added here_
25+
26+
<!-- Maintainers, insert changes / features for the next release here -->
27+
28+
## vcspull 1.15.0 (2022-10-09)
29+
30+
**Completions have changed** (#400)
31+
32+
Completions now use a different tool: [shtab]. See the [completions page] for more information.
33+
34+
If you were using earlier versions of vcspull (earlier than 1.15.0), you may need to uninstall the old completions, first.
35+
36+
[completions page]: https://vcspull.git-pull.com/cli/completion.html
37+
[shtab]: https://docs.iterative.ai/shtab/
2538

2639
<!---
2740
# vim: set filetype=markdown:

docs/cli/completion.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
(completion)=
2+
3+
(completions)=
4+
5+
(cli-completions)=
6+
7+
# Completions
8+
9+
## vcspull 1.15+ (experimental)
10+
11+
```{note}
12+
See the [shtab library's documentation on shell completion](https://docs.iterative.ai/shtab/use/#cli-usage) for the most up to date way of connecting completion for vcspull.
13+
```
14+
15+
Provisional support for completions in vcspull 1.17+ are powered by [shtab](https://docs.iterative.ai/shtab/). This must be **installed separately**, as it's **not currently bundled with vcspull**.
16+
17+
```console
18+
$ pip install shtab --user
19+
```
20+
21+
:::{tab} bash
22+
23+
```bash
24+
shtab --shell=bash -u vcspull.cli.create_parser \
25+
| sudo tee "$BASH_COMPLETION_COMPAT_DIR"/VCSPULL
26+
```
27+
28+
:::
29+
30+
:::{tab} zsh
31+
32+
```zsh
33+
shtab --shell=zsh -u vcspull.cli.create_parser \
34+
| sudo tee /usr/local/share/zsh/site-functions/_VCSPULL
35+
```
36+
37+
:::
38+
39+
:::{tab} tcsh
40+
41+
```zsh
42+
shtab --shell=tcsh -u vcspull.cli.create_parser \
43+
| sudo tee /etc/profile.d/VCSPULL.completion.csh
44+
```
45+
46+
:::
47+
48+
## vcspull 0.9 to 1.14
49+
50+
```{note}
51+
See the [click library's documentation on shell completion](https://click.palletsprojects.com/en/8.0.x/shell-completion/) for the most up to date way of connecting completion for vcspull.
52+
```
53+
54+
vcspull 0.1 to 1.14 use [click](https://click.palletsprojects.com)'s completion:
55+
56+
:::{tab} bash
57+
58+
_~/.bashrc_:
59+
60+
```bash
61+
62+
eval "$(_VCSPULL_COMPLETE=bash_source vcspull)"
63+
64+
```
65+
66+
:::
67+
68+
:::{tab} zsh
69+
70+
_~/.zshrc_:
71+
72+
```zsh
73+
74+
eval "$(_VCSPULL_COMPLETE=zsh_source vcspull)"
75+
76+
```
77+
78+
:::

docs/cli/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
sync
1010
```
1111

12+
```{toctree}
13+
:caption: Completion
14+
:maxdepth: 1
15+
16+
completion
17+
```
18+
1219
(cli-main)=
1320

1421
(vcspull-main)=

0 commit comments

Comments
 (0)