This directory contains bash completion scripts for markdown-runner that provide intelligent autocompletion for command-line arguments.
- Flag completion: Complete all command-line flags (
-d,--dry-run, etc.) - Stage completion: Complete stage names from your markdown files when using
-Bor-s - Chunk completion: Complete chunk IDs and indices when using
-B stage/format - File completion: Complete
.mdfiles and directories for the main argument - Directory traversal: Navigate through subdirectories with Tab completion (e.g.,
test/cases/) - Context-aware completion: When targeting directories, only shows
file@completions to avoid ambiguous stage names - Smart discovery: Automatically discovers stages and chunks from markdown files in your current directory
- Smart chainable completions: Intelligent trailing space behavior - single-chunk stages get trailing spaces (complete workflow), multi-chunk stages enable chaining (e.g.,
setup<TAB>→setup/<TAB>→setup/init)
./install.shThis installs completion for the current user only and adds it to your .bashrc.
./install.sh systemThis installs completion system-wide (requires sudo) for all users.
You can also manually source the completion script:
source ./bash_completion.shAdd this line to your .bashrc to enable it permanently.