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

Filtering function to stop multiline

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

For example we have a Prolog multine, and in many Prolog interpreters the dot ('.') character marks the end of the sentence, so it would be nice to exit from the multiline mode after you typed dot. So there would not be needed to use Meta+Enter to exit multiline.
But with the current interface I wasn't able to find how to do that.

See

some_rule(A, B, C) :-
   A > 0,
   B < 0.
   C. % if we press Enter after typing dot the multiline should end here, and proceed to the REPL execution.

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 tracing the interface's multiline mode and the handling of Meta+Enter before REPL execution. Determine where submitted input can be inspected for a terminating dot, then verify that pressing Enter after the dot exits multiline mode and proceeds to execution without changing other multiline behavior.

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
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.