sphinx
sphinx copied to clipboard
Add shell completions by shtab
Subject: Add shell completions by shtab
Feature or Bugfix
- Feature
Install
cmds=(apidoc autogen build quickstart)
for cmd in $cmds; do
sphinx-$cmd --print-completion bash | sudo tee /usr/share/bash-completion/completions/sphinx-$cmd
sphinx-$cmd --print-completion zsh | sudo tee /usr/share/zsh/site-functions/_sphinx-$cmd
sphinx-$cmd --print-completion tcsh | sudo tee /etc/profile.d/sphinx-$cmd.completion.csh
done
Result
❯ sphinx-quickstart -<TAB>
option
-a author names
--author author names
--batchfile create batchfile
-d define a template variable
--dot replacement for dot in _templates etc.
...
❯ sphinx-quickstart --templatedir <TAB>
templatedir
doc/ sphinx/ tests/ utils/