core/cli: add completion for hpi command

This commit is contained in:
Sean Breckenridge 2022-02-15 18:20:47 -08:00 committed by karlicoss
parent f1b18beef7
commit 8b01674fed
5 changed files with 133 additions and 0 deletions

12
misc/completion/generate Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
# assumes HPI is already installed
# generates the completion files
cd "$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
mkdir -p ./bash ./zsh ./fish
_HPI_COMPLETE=fish_source hpi >./fish/hpi.fish
# underscores to allow these directories to be lazily loaded
_HPI_COMPLETE=zsh_source hpi >./zsh/_hpi
_HPI_COMPLETE=bash_source hpi >./bash/_hpi