Re: expect match fancy prompt
- From: "F. Michael Orr" <michael_orr25@xxxxxxxxx>
- Date: Tue, 29 Jul 2008 08:55:29 -0500
On Tue, 17 Jun 2008 20:35:26 -0400, Russell Treleaven wrote:
Hi,
I have been trying to figure out how to match the prompt described
below.
Actually I think I just want to match the from the dollar sign to the
end of the prompt.
PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
Alternatively can anbody provide a link to a good primer on escape
sequences?
Sincerely,
russ@xxxxxxxx
I take it that this is a Linux system? If so, then a simple solution
that I have found is to remove the above altogether. Create a new shell
instance in your Expect script, then exp_send "unset PROMPT_COMMAND\r".
Once that is done, you can set PS1 to be anything you like (preferably
something like "$ ", and you won't have to deal with the escape sequences
inside the prompt.
.
- Prev by Date: Re: Referencing values in an array
- Next by Date: Re: Tk8.5: text-widget yview command gives wrong information
- Previous by thread: Software Package Free! ... about our Free Software
- Next by thread: Making tktreectrl `just big enough'
- Index(es):
Relevant Pages
|