prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Triggering Completer when calling CommandLineInterface.read_input()?

Open
#62 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

I'm hacking up a little utility and was looking through the examples, but couldn't figure out if there was a simple way to automatically bring up my Completer when calling CommandLineInterface.read_input() (w/o digging through the guts of the lib)?

Also, is there a way to also assign autocompletion to different keys (ie, to the down key as well perhaps)?

Lastly, I'm doing a rather ugly hack (reading a global List) to be able to dynamically populate the Completer - the completers are generated anonymously on every keystroke it looks like? Just want to make sure I'm not missing anything there...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the examples and the CommandLineInterface.read_input() and Completer APIs to determine how completion is currently connected. Clarify whether the desired outcome is automatic completion, additional key bindings, dynamic completer data, or all three; done would require an agreed API and documented behavior for each supported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.