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

enter executes command during multi-column tab completion

Open
#764 1 comment 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

Multi-column tab completion described in https://github.com/prompt-toolkit/python-prompt-toolkit/issues/147 seems mostly working now with ptk 2.0! However there is still what might be a small issue. If you watch the video of what I'm expecting:

zsh tab completion

Expected behavior:

  1. hit tab to get a list of options
  2. arrow select the item
  3. hit enter, which adds the text to the command
  4. hit enter to execute the command

Actual behavior:

  1. hit tab to get a list of options
  2. arrow select the item
  3. hitting enter actually executes the command

This means it is hard to use tab completion for a long path, because the command will execute on the directory. I'm not sure if this is an issue I should bring at https://github.com/xonsh/xonsh/issues/2364 or here in PTK, so I'm sorry if it is the incorrect location.

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 by reproducing the multi-column completion behavior described in this issue and compare it with the linked issue 147 and video. Determine whether Enter handling belongs in python-prompt-toolkit or the xonsh integration; done means selecting a completion inserts the text without executing, so a second Enter is required to run the command.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.