From help-octave-request at bevo dot che dot wisc dot edu Wed Oct 18 22:30:12 1995 Subject: Personalized Prompt From: John Eaton To: Jerry Lynch Cc: help-octave at bevo dot che dot wisc dot edu Date: Wed, 18 Oct 1995 22:30:12 -0500 Jerry Lynch 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