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

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

[Octave-bug-tracker] [bug #49214] Readline library does not support writ


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #49214] Readline library does not support writing to Windows files with "hidden" attribute
Date: Thu, 29 Sep 2016 21:30:25 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

Follow-up Comment #23, bug #49214 (project octave):

The behavior for readline history is up to the program to decide how to write.
Octave has decided to emulate bash, whose default behavior is to overwrite the
history file when the shell exits. The shell and user are thus in control of
how large the history buffer is.

When the bash shell starts, it reads the ~/.bash_history file into its
in-memory history buffer. As commands are run, they are appended to the end of
the in-history list (up to HISTSIZE in-memory entries). When the shell exits,
it overwrites the entire ~/.bash_history file with the N last entries, where N
is controlled by the HISTFILESIZE variable.

Bash does have a "histappend" option, which instructs the shell to always
append history to the file rather than overwriting it on exit, meaning it will
grow indefinitely instead of being truncated to HISTFILESIZE (but still
limited by the in-memory limit HISTSIZE).

Octave could add a history_append() boolean option to mimic bash
"histappend".

It would be nice if you or someone could thoroughly test that this would
actually work, for example with the bash shell under mingw where
~/.bash_history has the "hidden" attribute set.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49214>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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