Are there any good examples for custom completion script?
shannmu opened this issue · 2 comments
I am working on a project about Command Line Argument Parser, specifically the part about supporting dynamic completion. I saw in the elvish manual (https://elv.sh/ref/edit.html#edit:completion:start) that there are some APIs that might be used for completion, such as $edit:-dot
, $edit:completion:arg-complete
r, $edit:completion:binding
, $edit:completion:matcher
, and $edit:current-command
.
However, I am not an elvish user, so I am not quite sure how to implement the completion feature for a command using elvish script. Are there any good examples available?
Hi! You can find some in https://github.com/elves/awesome-elvish?tab=readme-ov-file#completion-scripts
@shannmu -- you may also be interested in carapace: https://carapace.sh and you can see how it generates elvish completions