Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a bolt task to setup shell completion #289

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tasks/completion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"description": "Setup choria completion"
}
11 changes: 11 additions & 0 deletions tasks/completion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
for p in /usr/share/bash-completion /usr/local/etc/bash_completion.d; do
if [ -d "$p" ]; then
choria completion --bash > "$p/choria"
fi
done
for p in /usr/share/zsh/vendor-completions /usr/local/share/zsh/site-functions; do
if [ -d "$p" ]; then
choria completion --zsh > "$p/_choria"
fi
done