[Top][All Lists]

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

Re: enhancement merge request

From: Lawrence Velázquez
Subject: Re: enhancement merge request
Date: Mon, 19 Apr 2021 12:40:49 -0400

> On Apr 19, 2021, at 7:18 AM, Greg Wooledge <greg@wooledge.org> wrote:
> On Mon, Apr 19, 2021 at 01:16:48AM -0400, Grisha Levit wrote:
>> I think you can do something similar to the patch directly in the shell by
>> temporarily unsetting HISTFILE and then deleting history entries in a
>> certain range and restoring HISTFILE when you are ready
> I still think my solution fits the criteria exactly.  There was *no*
> stated requirement that the "private mode" could not be a separate
> shell process.

This wasn't explicitly stated either, but it seems like Ananth wants
"private mode" to have access to preceding history.  Perhaps something
resembling this (with `history -a` instead, if preferred)?

        private_mode() {
            history -w
            bash --rcfile <(
                    echo source ~/.bashrc
                    echo history -r
                    echo unset HISTFILE


reply via email to

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