[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57027] Unclear documentation for command "his
[Octave-bug-tracker] [bug #57027] Unclear documentation for command "history_file"
Sat, 12 Oct 2019 04:38:17 -0400 (EDT)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Follow-up Comment #2, bug #57027 (project octave):
Thanks for the additional hints. And sorry, I don't intend to open a seperate
bug report for all of my "support" questions, in general.
Yes, I think adding some explanations to the help string of the history_file
command would be useful.
Here is my suggestion for this:
VAL = history_file ()
OLD_VAL = history_file (NEW_VAL)
Query or set the internal variable that specifies the name of the
file used to store command history.
All future Octave commands issued during the current Octave session
will then be written into this new file (if the current setting of
"history_save" allows for this).
The default value for the history file is '~/.octave_hist', but this
may be overridden by the environment variable 'OCTAVE_HISTFILE'.
* If you want to permanently change the location of Octave's history
file you need to reissue the "history_file" command in every new Octave
This can be achived by using Octave's ".octaverc" startup file.
* If you also want to read the saved history commands of past Octave sessions
from this different history file, then you need to use the additional command
"history -r" after setting the new value of the history file. A useful code
in Octave's startup file to do this could look like this:
if (exist (history_file ())
See also: history, history_size, history_save,
Reply to this item at:
Message sent via Savannah