Customizing Octave
octave, terminal
Solution
You can create edit `~/.octaverc` file that contains all the commands you want to execute when Octave starts up. This file is exactly like a `.m` Octave script file.
Just add `PS1('>> ')` to your `~/.octaverc` file. You can use your favorite text editor or use `echo` on the command line:
$ echo "PS1('>> ')" >> ~/.octaverc
After that you can see the `~/.octaverc` file :
$ more ~/.octaverc
It should contain the following line :
PS1('>> ')
For the second question, I am not sure if you're on OSX or Ubuntu or something else. If `octave` is in your search-path then you should be able to start Octave by just trying `octave`. Try these commands to find out what `octave` points to
$ which octave
/usr/bin/octave
$ type octave
octave is /usr/bin/octave
If somehow, `octave` is not your `PATH` search-path, this could be because you installed Octave at a non-standard location. You can do one of two things:
Add the folder containing your Octave executable to your `PATH` search-path. In `bash`, you can do this by adding the following line to your `~/.bashrc` (or `~/.profile` on MacOSX):
export PATH=~/path/to/octave/folder:${PATH}
You can create a soft symlink to your octave executable.
ln -s /path/to/octave/executable octave
This will create a symlink in your current folder. Now, as long as you're in the current folder, you'll be able to type in `octave` and run Octave. If you want to be able to run Octave from anywhere (and not necessarily the current folder), you need to add the current folder to your search-path (see point 1 above).
Problem
I am just starting with Octave and running it on my terminal so far. Everytime I open the prompt, my command line starts with : ``` octave-3.4.0:1> ``` So I use the following to make it shorter and easier to read: ``` PS1('>> ') ``` How can I change my settings to exectute this code automatically everytime I open octave? How top of this, is there a way to change my terminal settings to open Octave when I enter 'Octave'? The way I do it now is by using ``` 'exec 'path/to/octave/ ``` Thanks