10000 Change: Improve zsh completion installation instructions · greenbone/autohooks@f71b1ad · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit f71b1ad

Browse files
committed
Change: Improve zsh completion installation instructions
shtab 1.7.0 supports eval for zsh.
1 parent 5b47f57 commit f71b1ad

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Welcome to **autohooks**!
2020
- [Plugins](#plugins)
2121
- [Installing autohooks](#installing-autohooks)
2222
- [Command Completion](#command-completion)
23+
- [Setup for bash](#setup-for-bash)
24+
- [Setup for zsh](#setup-for-zsh)
2325
- [Maintainer](#maintainer)
2426
- [Contributing](#contributing)
2527
- [License](#license)
@@ -110,7 +112,7 @@ modes see the [documentation](https://greenbone.github.io/autohooks).
110112
`autohooks` comes with support for command line completion in bash
111113
and zsh.
112114

113-
Setup for bash:
115+
### Setup for bash
114116

115117
```bash
116118
echo "source ~/.autohooks-complete.bash" >> ~/.bashrc
@@ -124,12 +126,19 @@ the eval function of your bash shell:
124126
eval "$(autohooks --print-completion bash)"
125127
```
126128

127-
Setup for zsh:
129+
### Setup for zsh
128130

129131
```zsh
130132
echo 'fpath=("$HOME/.zsh.d" $fpath)' >> ~/.zsh
131133
mkdir -p ~/.zsh.d/
132-
autohooks --print-completion zsh > ~/.zsh.d/_greenbone_feed_sync
134+
autohooks --print-completion zsh > ~/.zsh.d/_autohooks
135+
```
136+
137+
Alternatively, you can use the result of the completion command directly with
138+
the eval function of your zsh shell:
139+
140+
```bash
141+
eval "$(autohooks --print-completion zsh)"
133142
```
134143

135144
## Maintainer

poetry.lock

Lines changed: 5 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ python = "^3.9"
4141
tomlkit = ">=0.5.11"
4242
pontos = ">=22.8.0"
4343
rich = ">=12.5.1"
44-
shtab = ">=1.6.5"
44+
shtab = ">=1.7.0"
4545

4646
[tool.poetry.dev-dependencies]
4747
autohooks-plugin-black = ">=21.12.0"
@@ -64,9 +64,7 @@ target-version = ['py39', 'py310', 'py311', 'py312']
6464
exclude = '''
6565
/(
6666
\.git
67-
| \.hg
6867
| \.venv
69-
| \.circleci
7068
| \.github
7169
| \.vscode
7270
| _build

0 commit comments

Comments
 (0)
0