git tpl completion¶
Print a shell completion script.
The script is generated from the same command definition the parser is built from, so it can never offer a flag the binary does not accept.
Installing it¶
The leading underscore is not decoration — it is how zsh finds the file.
The directory must be on your fpath.
If you installed git-tpl with Homebrew or from the AUR, the completions are already in place — the packages install them for you.
git tpl <TAB> versus git-tpl <TAB>¶
The generated script completes git-tpl, the executable your shell sees on PATH.
It does not complete git tpl, because that first word is git, and what happens after it belongs to Git's own
completion.
git-tpl <TAB> therefore works as soon as the script is installed.
git tpl <TAB> needs one line telling Git's completion to defer to it:
Both spellings run the same program either way; only the completion differs.
The man page¶
The companion to this is the man page, which is what makes git tpl --help work at all — Git intercepts
--help for a subcommand and runs man git-tpl.
The packages install it.
If you installed with cargo install, generate it yourself:
Without it, git tpl --help fails with No manual entry for git-tpl.
Use git-tpl --help in the meantime, which Git never intercepts.