prompt-toolkit / python-prompt-toolkit

Library for building powerful interactive command line applications in Python
https://python-prompt-toolkit.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9.37k stars 716 forks source link

enter executes command during multi-column tab completion #764

Open ahundt opened 6 years ago

ahundt commented 6 years ago

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.

ahundt commented 6 years ago

Turns out this already exists!

Any chance these or some even better set of automation options could be enabled by default? :-)