[MacPorts] #56381: It would be nice if shell mode saved command history immediately
MacPorts
noreply at macports.org
Sun Apr 29 01:59:48 UTC 2018
#56381: It would be nice if shell mode saved command history immediately
---------------------------+--------------------
Reporter: ylluminarious | Owner: (none)
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.4.3
Keywords: | Port:
---------------------------+--------------------
Hi,
I'm new to Macports so I hope that this ticket is not a duplicate and that
it meets the Ticket Guidelines. Anyway, as I was using Macports' shell
mode, I noticed history is only saved after the main command loop exits.
This approach has a major drawback (which I've often been a victim of
while using {{{bash}}}).
If the {{{port}}} process is abruptly killed, then that session's history
is gone. This can happen by pressing {{{^C}}} twice, which can quite
easily happen as an accident. There are also a myriad of other dangers
which could abruptly kill a `port` shell session before its time.
It would be nice if each command got written to the history file right
after it was entered. This is how {{{zsh}}} does it and I've always been
fond of it, since you always know that your history is saved. I looked in
[https://github.com/macports/macports-
base/blob/v2.4.3/src/port/port.tcl#L4855 src/port/port.tcl] to see if
there was a setting to enable such behavior, but I see no such setting
there. Specifically, I looked in the {{{process_command_file}}} procedure,
but found nothing relating to this.
--
Ticket URL: <https://trac.macports.org/ticket/56381>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list