help-octave
[Top][All Lists]
Advanced

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

cant' set PS1 after restart on Mac


From: John W. Eaton
Subject: cant' set PS1 after restart on Mac
Date: Wed, 10 Oct 2007 00:55:06 -0400

On  9-Oct-2007, DushanM wrote:

| On Mac OS X.4.10 I had Octave 2.9.14 running with the prompt modified to
| read
| 
|     PS1 ('\n*** \s:\#\$\n=> ')
| 
| and had saved that variable to a file (~/octave/Oprompt.def).  Then
| quit octave and the terminal, installed an EFI firmware update, shut
| down, and rebooted (the install was successful).
| 
| Everything seemed to be fine, and the newly invoked octave included
| the path to ~/octave that I had added previously.  Then I tried to
| load PS1 from the saved value in Oprompt.def, and octave made no
| objection, but just returned with the default prompt:
| 
|     octave-2.9.14:1> load ~/octave/Oprompt.def PS1
|     octave-2.9.14:2> PS1
|     PS1 = \n*** \s:\#\$\n=> 
| 
| Puzzled, I entered it by hand and got:
| 
|     octave-2.9.14:6> PS1 ('\n*** \s:\#\$\n=> ') 
|     error: invalid vector index = 115
| 
| No variation of this did any better.  Any idea what I'm doing wrong
| here?

PS1 is a function, not a variable.

| One more question:  I made the Terminal prompt a different color
| for visibility, like this (in bashrc):
| 
|     PS1='\n\[\e[1;34m\][\w]\[\e[0m\]\$\n=> '
| 
| Is it possible to add color to the Octave prompt as well?  It wasn't
| clear how to do that from the docs.

I think

  PS1 ('\n\[\e[1;34m\][\w]\[\e[0m\]\$\n=> ');

will work in the upcoming 2.9.15 snapshot.

jwe


reply via email to

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