help-octave
[Top][All Lists]
Advanced

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

Personalized Prompt


From: John Eaton
Subject: Personalized Prompt
Date: Wed, 18 Oct 1995 22:30:12 -0500

Jerry Lynch <address@hidden> wrote:

: I'm using octave 1.1.1 for Linux.  I have my prompt set in my .octaverc 
: file as:
: 
: PS1="^[[34m[\\!] \\t \\w \\s\\$^[[0m "
: 
: Where "^[" is the escape character.  This allows me to change the color 
: of my prompt.  This is very helpful when viewing the work-session.  
: Everything works great, except when the command I enter wraps to the next 
: line.  The problem is that when you search through the history (using 
: control-p), lines that were wrapped don't display properly if you type 
: 'control-a' on them.

You will be able to fix this in the next release by using `\[ \]'
pairs in the prompt string to quote the invisible characters.

Your prompt string would be

  PS1="\\[^[[34m\\][\\!] \\t \\w \\s\\$\\[^[[0m\\] "

or, to avoid putting the escape character directly in your startup
file:

  PS1="\\[\\033[34m\\][\\!] \\t \\w \\s\\$\\[\\033[0m\\] "

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]