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

TerminalView position and text of prompt


Is there a simple way to find where the prompt begins in a terminal and
what it is?

Ie, Line and Column.

Something i am finding useful with a terminalview is to be able to get the
current command line (the command currently being typed at the prompt.)

I am using the String i "expect" the prompt to be and searching the
terminalview.text for the first occurrence of "Username:Path$ " ("bonus:~$
")

I have imported the gb.form.terminal component into my program so can
access any part of the source not just the api. are there any variables in
the source that specify where the prompt begins/ends and the command line
starts?

I am making something similar to gambas "Snippets" to insert/manipulate
text but for a terminalview.

I am finding this very possible , The Achilles heel is my code for finding
the prompt end/command line start. I do not like/trust the code and need a
more reliable method.

Respects
BruceS

Follow-Ups:
Re: TerminalView position and text of promptGianluigi <gradobag@xxxxxxxxxxx>
Re: TerminalView position and text of promptBB <adamnt42@xxxxxxxxx>