From e0af4d2ef475a3e44aafacb973468351e22bd033 Mon Sep 17 00:00:00 2001 From: Gaspard Kirira Date: Thu, 2 Apr 2026 13:06:30 +0300 Subject: [PATCH] chore(release): prepare v2.1.2 --- CHANGELOG.md | 36 +++++++++- README.md | 34 ++++++++++ docs/shell-completion.md | 141 +++++++++++++++++++++++++++++++++++++++ modules/cli | 2 +- 4 files changed, 211 insertions(+), 2 deletions(-) create mode 100644 docs/shell-completion.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 283640c..7d29f51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- ## [Unreleased] -## v2.1.1 +## [v2.1.2] + +### Features + +- feat(cli): add shell completion command (bash) + Generate auto-completion scripts for a smoother CLI experience. + +- feat(search): add pagination support + Introduces `--page` and `--limit` flags for better navigation in search results. + +### Improvements + +- fix(run): use PTY for live runtime stdout + Improves real-time output when running applications with `vix run`. + +- fix(cli): improve command suggestions + Suggestions now rely on dispatcher entries for more accurate results. + +### Documentation + +- add shell completion guide + New documentation explaining how to enable and use CLI auto-completion. + +### Developer Experience + +- smoother CLI interaction with better suggestions +- improved readability of runtime output +- enhanced usability for large search results + +### Stability + +- improved reliability of CLI runtime behavior +- no breaking changes + +## [v2.1.1] ### Fixes diff --git a/README.md b/README.md index a4fb7f1..d7bfe04 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,23 @@ +--- + +## Contents + +- [Install](#install) +- [Build from source](#build-from-source) +- [Your first Vix.cpp program](#your-first-vixcpp-program) +- [Script mode](#script-mode-no-project-setup) +- [Shell completion](#shell-completion) +- [Why Vix.cpp](#why-vixcpp) +- [Performance](#performance) +- [Core principles](#core-principles) +- [Learn more](#learn-more) +- [Contributing](#contributing) + +--- + ## Install #### Linux @@ -131,6 +148,23 @@ Run C++ like a script: vix run main.cpp ``` +## Shell completion + +Enable tab completion for Vix commands. + +```bash +source <(vix completion bash) +``` + +Make it permanent: + +```bash +vix completion bash > ~/.vix-completion.bash +echo 'source ~/.vix-completion.bash' >> ~/.bashrc +``` + +Learn more: https://vixcpp.com/docs/modules/cli/completion + ## Why Vix.cpp Most systems assume perfect conditions. diff --git a/docs/shell-completion.md b/docs/shell-completion.md new file mode 100644 index 0000000..2f0a474 --- /dev/null +++ b/docs/shell-completion.md @@ -0,0 +1,141 @@ +# Vix Shell Completion + +Enable command auto-completion for Vix in Bash. + +--- + +## Overview + +Vix can generate shell completion scripts for Bash. + +This allows: + +- faster command typing +- fewer mistakes +- discoverability of commands + +--- + +## Quick Start + +Load completion for the current shell session: + +```bash +source <(vix completion bash) +``` + +Now try: + +```bash +vix bu +vix ins +vix help ru +``` + +--- + +## Persist It + +To enable completion automatically: + +```bash +vix completion bash > ~/.vix-completion.bash +echo 'source ~/.vix-completion.bash' >> ~/.bashrc +source ~/.bashrc +``` + +--- + +## What It Completes + +Supports: + +- top-level commands +- `vix help ` + +Examples: + +```bash +vix bu # build +vix compl # completion +vix help ru # run +``` + +--- + +## How It Works + +`vix completion bash` prints a Bash completion script to stdout. + +To activate it: + +```bash +source <(vix completion bash) +``` + +Running only: + +```bash +vix completion bash +``` + +will NOT enable completion. + +--- + +## Troubleshooting + +If TAB does not work: + +### 1. Ensure script is loaded + +```bash +source <(vix completion bash) +``` + +### 2. Ensure Bash is used + +```bash +echo $SHELL +``` + +### 3. Reload config + +```bash +source ~/.bashrc +``` + +### 4. Check output + +```bash +vix completion bash +``` + +You should see `_vix_completions`. + +--- + +## Example Session + +```bash +source <(vix completion bash) + +vix bu +vix help in +``` + +--- + +## Notes + +- Completion is generated from registered Vix commands +- Always stays in sync with CLI +- No external Bash completion tools required + +--- + +## License + +MIT License +Copyright (c) Gaspard Kirira + diff --git a/modules/cli b/modules/cli index 923ea2b..be79513 160000 --- a/modules/cli +++ b/modules/cli @@ -1 +1 @@ -Subproject commit 923ea2b5bad1cfd9b0fc76a913a9a4ee821fd636 +Subproject commit be79513c2a0cfe88ff0f19b0880504f4e13783d9