Skip to content

Commit 952f0ed

Browse files
committed
docs: how to generate completions
1 parent 0203138 commit 952f0ed

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,26 @@ ffmpeg-normalize is a Python utility for audio normalization using ffmpeg. It su
2424
- `pdoc -d google -o docs-api ./ffmpeg_normalize` - Generate API documentation
2525
- `uvx --with mkdocs-material mkdocs gh-deploy` - Deploy MKdocs documentation
2626

27+
### Shell Completions
28+
To regenerate shell completions after adding new CLI options:
29+
```bash
30+
# Bash
31+
uv run python -c "
32+
from ffmpeg_normalize.__main__ import create_parser
33+
import shtab
34+
parser = create_parser()
35+
print(shtab.complete(parser, shell='bash'))
36+
" > completions/ffmpeg-normalize-shtab.bash
37+
38+
# Zsh
39+
uv run python -c "
40+
from ffmpeg_normalize.__main__ import create_parser
41+
import shtab
42+
parser = create_parser()
43+
print(shtab.complete(parser, shell='zsh'))
44+
" > completions/ffmpeg-normalize-shtab.zsh
45+
```
46+
2747
## Architecture
2848

2949
### Core Components

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ dev = [
5353
"ruff>=0.12.11",
5454
"mypy>=1.0.0",
5555
"types-tqdm",
56+
"shtab>=1.7.0",
5657
]
5758

5859
[tool.mypy]

uv.lock

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

0 commit comments

Comments
 (0)