Skip to content

Conversation

pneff
Copy link

@pneff pneff commented Sep 11, 2023

Together with click's Shell Completion support, this allows to auto-complete llm -t <tab> invocations.

This is an initial proof of concept. If you think this is the right thing to do, I can invest a little time to polish it. A few tasks I see as open:

  • Check which other arguments would benefit from such treatment.
  • Extend the documentation to include the autocomplete setup in the user guide.
  • Fix auto-completion on the initial command. For example llm <tab> currently doesn't work.
  • Performance is an issue, it's rather slow on my end.

For information how to set up the autocomplete here, see the official Click Shell Completion documentation.

Together with click's Shell Completion support, this allows to
auto-complete `llm -t <tab>` invocations.
@pneff
Copy link
Author

pneff commented Sep 13, 2023

I have extended this slightly to auto-complete models as well. Template auto-complete also is fixed now to actually complete based on partial template names.

For command completion I sources the root cause, see click-contrib/click-default-group#22.

@simonw let me know if you are happy for me to continue with this PR. I would then add the documentation and some test coverage here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant