Skip to content

Robust detection of end of prompt #4852

@egmontkob

Description

@egmontkob

Is there an existing issue for this?

  • I have searched the existing issues

Midnight Commander version and build configuration

4.8.33, git

Operating system

any

Is this issue reproducible using the latest version of Midnight Commander?

  • I confirm the issue is still reproducible with the latest version of Midnight Commander

How to reproduce

We don't have a way to reliably detect when the subshell has finished printing its prompt.

Yet, at some point, when a command that we launched from mc's panels finishes, we have to decide to show the panels.

It looks to me that currently we're relying on heuristics, e.g. whatever that arrives in a single read() or something similar. This already causes problems (e.g. #4843; there were more but I'm just lost :))

Let's try to find a way to reliably detect when the subshell has finished printing the prompt; replace some of these heuristics by reliable solutions.

Expected behavior

.

Actual behavior

.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageNeeds triage by maintainersprio: mediumHas the potential to affect progress

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions