Skip to content

Enable multi-line commit body input #1917

@axkoro

Description

@axkoro

Description

The interactive prompt has no visible way to enter multi-line commit bodies. Pressing Enter submits the field.

Reading the source code reveals that there is an undocumented feature for this: entering | in the body field acts as a line break separator. This works, but is impossible to discover without reading the source.

Possible solution

Two improvements would address this:

  1. Document the | separator. At minimum in the docs, ideally as a hint in the prompt.
  2. Support Shift+Enter as a newline. I assume this is expected behaviour for most people (at least it was for me), because most editors do it like this. Additionally, the user could see the newline rendered directly, instead of some character somewhere in the text.

Additional context

The | behaviour is implemented in multiple_line_breaker, added as a filter to the "body" QzQuestion.

Related issues

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions