Closed DUOLabs333 closed 2 years ago
rlwrap
always saves its history whenever it exits, irrespective of the cause of the exit, which may be the rlwrap
ped program exiting, seeing a CTRL+D
of getting a signal (except SIGKILL
, of course) that causes it to exit
if you do Ctrl+D, history is not saved.
On my machine, it is, which means that I cannot reproduce the problem
Can you give a little more information: what command are you rlwrap
ping, what input are you entering, etc.
NB: from the title of this issue I expected a different request: that rlwrap
should have an option to always immediately update the history file after each input line, rather like the zsh
option INC_APPEND_HISTORY
This is indeed something to look into, but not needed to solve your issue.
NB: from the title of this issue I expected a different request: that rlwrap should have an option to always immediately update the history file after each input line, rather like the zsh option INC_APPEND_HISTORY
This is exactly what I'm asking for. I am using rmaxima
, which is basically rlwrap maxima
.
This is exactly what I'm asking for
OK, this is doable and may be useful in some situations. I'll mark this as a feature request
But you also mentioned:
However, if you do Ctrl+D, history is not saved.
This would be an rlwrap
bug. Can you elaborate?
I enter in some maxima expression and press enter. If I press Ctrl+D, then restart it, the input is not saved. It's only when I enter in the line and type in quit();
that it is saved.
I cannot reproduce the problem. Maybe the maxima people can help?
I'm on maxima 5.44.0
In this kind of cases (i.e. a bug I cannot reproduce), please:
rlwrap
from source, using ./configure --enable-debug
rlwrap --debug <command>
(where <command>
is e.g. maxima
)CTRL+D
)/tmp/rlwrap.debug
It seems to be specific to Konsole, as xterm works fine.
Found the problem -- it was an user error.
Currently, it seems that rlwrap only saves an input to file if the program is exited properly (ie, not with
Ctrl+D
). However, if you doCtrl+D
, history is not saved.