diff options
Diffstat (limited to '')
-rw-r--r-- | completions/recit.zsh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/completions/recit.zsh b/completions/recit.zsh new file mode 100644 index 0000000..db7a043 --- /dev/null +++ b/completions/recit.zsh @@ -0,0 +1,19 @@ +if [[ ! -o interactive ]]; then + return +fi + +compctl -K _recit recit + +_recit() { + local word words completions + read -cA words + word="${words[2]}" + + if [ "${#words}" -eq 2 ]; then + completions="$(recit commands)" + else + completions="$(recit completions "${word}")" + fi + + reply=("${(ps:\n:)completions}") +} |