diff --git a/tasks/completion.json b/tasks/completion.json new file mode 100644 index 0000000..b9eec6d --- /dev/null +++ b/tasks/completion.json @@ -0,0 +1,3 @@ +{ + "description": "Setup choria completion" +} diff --git a/tasks/completion.sh b/tasks/completion.sh new file mode 100644 index 0000000..bd4b075 --- /dev/null +++ b/tasks/completion.sh @@ -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