[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: enhancement merge request
From: |
Ananth Chellappa |
Subject: |
Re: enhancement merge request |
Date: |
Sun, 18 Apr 2021 16:12:10 -0700 |
Chet, Lawrence,
Sincerely appreciate your time. Far as I understand, there is no
way to accomplish what I want - concisely : *get a true private mode* (no
logging to HISTFILE *OR* recall with history command after exiting
private-mode (toggle of history using set -/+ o) *without sacrificing
productivity*. That is, when you are *in private mode, you DO WANT recall
with !number and arrow keys. *Even this guy https://paulh.consulting/
thought it was easy before deciding it was worth $500 of his time to try
adding it :)
Naseeba's implementation gives me what I need. I'd like others to benefit
from it..
With current bash :
analog@DESKTOP-O264A5N ~ $ echo $HISTFILE
/home/analog/.bash_history
analog@DESKTOP-O264A5N ~ $ unset HISTFILE
analog@DESKTOP-O264A5N ~ $ echo a private command
a private command
analog@DESKTOP-O264A5N ~ $ echo an evil command
an evil command
analog@DESKTOP-O264A5N ~ $ h 10
2143 echo $HISTFILE
2144 set +o history
2145 h 10
2146 source /tmp/set_pm
2147 search roberge
2148 echo $HISTFILE
2149 unset HISTFILE
2150 echo a private command
2151 echo an evil command
2152 h 10
analog@DESKTOP-O264A5N ~ $ set HISTFILE=/home/analog/.bash_history
analog@DESKTOP-O264A5N ~ $ h 15
2140 echo "set +o history" > /tmp/set_pm
2141 . /tmp/set_pm
2142 h 10
2143 echo $HISTFILE
2144 set +o history
2145 h 10
2146 source /tmp/set_pm
2147 search roberge
2148 echo $HISTFILE
2149 unset HISTFILE
2150 echo a private command <---- Yikes, this was in private mode! I
shouldn't see this after "exiting"
2151 echo an evil command <---- private mode. LV suggested that using
HISTFILE unset/set would be be
2152 h 10
2153 set HISTFILE=/home/analog/.bash_history
2154 h 15
On Sun, Apr 18, 2021 at 3:02 PM Chet Ramey <chet.ramey@case.edu> wrote:
> On 4/18/21 12:03 AM, Ananth Chellappa wrote:
> > Hello Brian and Chet,
> > Please consider merging the enhancement made by Naseeba
> described
> > here :
>
> What is the ultimate goal of this change? And, whatever it is, why is it
> better than currently-available ways to accomplish the same thing?
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
>