help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] counterpart of HISTIGNORE/HISTCONROL but only for saving


From: Dave Rutherford
Subject: Re: [Help-bash] counterpart of HISTIGNORE/HISTCONROL but only for saving to .bash_history
Date: Wed, 17 Jun 2015 08:20:29 -0400

On Wed, Jun 17, 2015 at 7:53 AM, <address@hidden> wrote:
> is it possible to prevent bash from saving an command to the history file
but still keeping it in the in-memory history of the current session?
>
> this would be very useful if you need to run an "dangerous" command (e.g.
mkfs) multiple times in your current session but dont want it in your
history of any other session.

Set HISTCONTROL=ignorespace (or ignoreboth) and start your command with a
space.


reply via email to

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