octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #57027] Unclear documentation for command "his


From: Hartmut
Subject: [Octave-bug-tracker] [bug #57027] Unclear documentation for command "history_file"
Date: Sat, 12 Oct 2019 04:38:17 -0400 (EDT)
User-agent: 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'.

Notes:

* 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
session.
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:

   history_file ("~/new/.octave_hist");
   if (exist (history_file ())
     history -r
   endif


See also: history, history_size, history_save,
history_control, history_timestamp_format_string.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57027>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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