emacs-devel
[Top][All Lists]
Advanced

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

Re: Ignoring entries starting with space


From: Francesc Rocher
Subject: Re: Ignoring entries starting with space
Date: Thu, 25 Jun 2009 09:58:57 +0200


>> The same way it is possible to delete duplicates in minibuffer history,
>> I think it is also very useful to have the possibility to ignore
>> entries starting with space(s). The new variable `history-ignore-space'
>> would take care of this, being `nil' its defaut value.
>
> Could you explain some use cases?

I have one use case where this will be useful.

In http://thread.gmane.org/gmane.emacs.devel/91359/focus=92106
I suggested a piece of code for .emacs that removes potentially
dangerous commands from the minibuffer history.

With a new variable `history-ignore-space'=t this will be unnecessary
since it's possible to not put dangerous commands to the minibuffer history
with just prepending a command with a space like e.g. " rm -rf ."


Yes, that's the point. In general, any potentially dangerous command won't be stored
into the history by simply pre-pending an space. Its the same as in Bash, the source
of inspiration of this patch, especially when you are typing dangerous commands
as root. It's better not to store them into the history.

-- Francesc Rocher


reply via email to

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