[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TerminalView position and text of prompt


Le 16/04/2024 à 15:03, Bruce Steers a écrit :

So i just need to know reliably where exactly the PS1 prompt ends and the command begins.

If possible, If somewhere in the terminalview code this place is known?
Or if from the codes perspective that position is all handled by the running shell so it's irrelevant/unknown.

Respects
BruceS


I think there is no reliable way to detect a prompt:

- The shell knows what the prompt is, and when it will be printed to the terminal. But it cannot know how exactly it will be drawn inside the terminal.

- The terminal knows how things are drawn. But it has no way to know what is a prompt, and what is not a prompt.

Regards,

--
Benoît Minisini.


Follow-Ups:
Re: TerminalView position and text of promptBruce Steers <bsteers4@xxxxxxxxx>
Re: TerminalView position and text of promptBruce Steers <bsteers4@xxxxxxxxx>
References:
TerminalView position and text of promptBruce Steers <bsteers4@xxxxxxxxx>
Re: TerminalView position and text of promptGianluigi <gradobag@xxxxxxxxxxx>
Re: TerminalView position and text of promptBruce Steers <bsteers4@xxxxxxxxx>