[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TerminalView position and text of prompt
[Thread Prev] | [Thread Next]
- Subject: Re: TerminalView position and text of prompt
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Sat, 20 Apr 2024 07:55:09 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 20/04/2024 à 04:58, Bruce Steers a écrit :
I may have found an answer already in the code... https://gitlab.com/gambas/gambas/-/blob/master/comp/src/gb.form.terminal/.src/TerminalView/TerminalFilter_VT100.class?ref_type=heads#L158 <https://gitlab.com/gambas/gambas/-/blob/master/comp/src/gb.form.terminal/.src/TerminalView/TerminalFilter_VT100.class?ref_type=heads#L158> it does this..... If sCmd = "0" Or If sCmd = "2" Then hView.Title = sTitlesData at that point has the path to the left of iPos2 that is used to set the title and it seems to have the prompt to the rightIf sCmd = "0" Or If sCmd = "2" Then hView.Title = sTitle hView.Prompt = Mid$(sData, iPos2 + 1)I wish there was an easily way to remove escape sequences and convert it to plain textAll i found was a sed command Private Sub Prompt_Write(Value As String)Shell "echo -n '" & Value & "'| sed -r \"s/\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g\"" To $sPromptEnd Respects BruceS
This code manages the command for setting the terminal emulator window title. It is an XTerm specific command that became implicit standard.
Nothing says that the window title will include the prompt. Regards, -- Benoît Minisini.
Re: TerminalView position and text of prompt | Bruce Steers <bsteers4@xxxxxxxxx> |
TerminalView position and text of prompt | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: TerminalView position and text of prompt | Gianluigi <gradobag@xxxxxxxxxxx> |
Re: TerminalView position and text of prompt | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: TerminalView position and text of prompt | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: TerminalView position and text of prompt | Bruce Steers <bsteers4@xxxxxxxxx> |