Skip to content

Commit e0af4d2

Browse files
committed
chore(release): prepare v2.1.2
1 parent 97e05b2 commit e0af4d2

4 files changed

Lines changed: 211 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
---
99

1010
## [Unreleased]
11-
## v2.1.1
11+
## [v2.1.2]
12+
13+
### Features
14+
15+
- feat(cli): add shell completion command (bash)
16+
Generate auto-completion scripts for a smoother CLI experience.
17+
18+
- feat(search): add pagination support
19+
Introduces `--page` and `--limit` flags for better navigation in search results.
20+
21+
### Improvements
22+
23+
- fix(run): use PTY for live runtime stdout
24+
Improves real-time output when running applications with `vix run`.
25+
26+
- fix(cli): improve command suggestions
27+
Suggestions now rely on dispatcher entries for more accurate results.
28+
29+
### Documentation
30+
31+
- add shell completion guide
32+
New documentation explaining how to enable and use CLI auto-completion.
33+
34+
### Developer Experience
35+
36+
- smoother CLI interaction with better suggestions
37+
- improved readability of runtime output
38+
- enhanced usability for large search results
39+
40+
### Stability
41+
42+
- improved reliability of CLI runtime behavior
43+
- no breaking changes
44+
45+
## [v2.1.1]
1246

1347
### Fixes
1448

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,23 @@
4242
</tr>
4343
</table>
4444

45+
---
46+
47+
## Contents
48+
49+
- [Install](#install)
50+
- [Build from source](#build-from-source)
51+
- [Your first Vix.cpp program](#your-first-vixcpp-program)
52+
- [Script mode](#script-mode-no-project-setup)
53+
- [Shell completion](#shell-completion)
54+
- [Why Vix.cpp](#why-vixcpp)
55+
- [Performance](#performance)
56+
- [Core principles](#core-principles)
57+
- [Learn more](#learn-more)
58+
- [Contributing](#contributing)
59+
60+
---
61+
4562
## Install
4663

4764
#### Linux
@@ -131,6 +148,23 @@ Run C++ like a script:
131148
vix run main.cpp
132149
```
133150

151+
## Shell completion
152+
153+
Enable tab completion for Vix commands.
154+
155+
```bash
156+
source <(vix completion bash)
157+
```
158+
159+
Make it permanent:
160+
161+
```bash
162+
vix completion bash > ~/.vix-completion.bash
163+
echo 'source ~/.vix-completion.bash' >> ~/.bashrc
164+
```
165+
166+
Learn more: https://vixcpp.com/docs/modules/cli/completion
167+
134168
## Why Vix.cpp
135169

136170
Most systems assume perfect conditions.

docs/shell-completion.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Vix Shell Completion
2+
3+
Enable command auto-completion for Vix in Bash.
4+
5+
---
6+
7+
## Overview
8+
9+
Vix can generate shell completion scripts for Bash.
10+
11+
This allows:
12+
13+
- faster command typing
14+
- fewer mistakes
15+
- discoverability of commands
16+
17+
---
18+
19+
## Quick Start
20+
21+
Load completion for the current shell session:
22+
23+
```bash
24+
source <(vix completion bash)
25+
```
26+
27+
Now try:
28+
29+
```bash
30+
vix bu<TAB>
31+
vix ins<TAB>
32+
vix help ru<TAB>
33+
```
34+
35+
---
36+
37+
## Persist It
38+
39+
To enable completion automatically:
40+
41+
```bash
42+
vix completion bash > ~/.vix-completion.bash
43+
echo 'source ~/.vix-completion.bash' >> ~/.bashrc
44+
source ~/.bashrc
45+
```
46+
47+
---
48+
49+
## What It Completes
50+
51+
Supports:
52+
53+
- top-level commands
54+
- `vix help <command>`
55+
56+
Examples:
57+
58+
```bash
59+
vix bu<TAB> # build
60+
vix compl<TAB> # completion
61+
vix help ru<TAB> # run
62+
```
63+
64+
---
65+
66+
## How It Works
67+
68+
`vix completion bash` prints a Bash completion script to stdout.
69+
70+
To activate it:
71+
72+
```bash
73+
source <(vix completion bash)
74+
```
75+
76+
Running only:
77+
78+
```bash
79+
vix completion bash
80+
```
81+
82+
will NOT enable completion.
83+
84+
---
85+
86+
## Troubleshooting
87+
88+
If TAB does not work:
89+
90+
### 1. Ensure script is loaded
91+
92+
```bash
93+
source <(vix completion bash)
94+
```
95+
96+
### 2. Ensure Bash is used
97+
98+
```bash
99+
echo $SHELL
100+
```
101+
102+
### 3. Reload config
103+
104+
```bash
105+
source ~/.bashrc
106+
```
107+
108+
### 4. Check output
109+
110+
```bash
111+
vix completion bash
112+
```
113+
114+
You should see `_vix_completions`.
115+
116+
---
117+
118+
## Example Session
119+
120+
```bash
121+
source <(vix completion bash)
122+
123+
vix bu<TAB>
124+
vix help in<TAB>
125+
```
126+
127+
---
128+
129+
## Notes
130+
131+
- Completion is generated from registered Vix commands
132+
- Always stays in sync with CLI
133+
- No external Bash completion tools required
134+
135+
---
136+
137+
## License
138+
139+
MIT License
140+
Copyright (c) Gaspard Kirira
141+

0 commit comments

Comments
 (0)