top | item 18061209

(no title)

peff | 7 years ago

This makes sense for some completions (e.g., vanilla lists of options). But often the completion depends on other context that the binary doesn't need to know about. For example, I complete `git grep` patterns based on ctags. There's no reason git should know about ctags; it's only my personal completion that brings the two together.

discuss

order

powercf|7 years ago

That is probably a very rare case, and any shell-agnostic-completion-protocol could be extensible to handle such a case. But, I think 99% of completions that people want/use on a daily basis could be covered by a machine-readable version of the usual "--help" option (with support for placement of paths, pids, strings, numbers etc.).

loa-in-backup|7 years ago

If it doesn't work reliably for all cases, there would soon be inevitable need for the kind of scripted completion we have now.