[Grml] RC: disable zshrc's share_history feature by default?

Frank Terbeck ft at grml.org
Mon Mar 25 13:43:45 CET 2013


Csillag Tamas wrote:
> On Mon, Mar 25, 2013 at 10:47:40AM +0100, Michael Prokop wrote:
[..disable share_history..]
>> While I personally like the feature and somewhat got used to it it's
>> also one of the most discussed settings of grml-zshrc. It has the
>> potential to do harm, especially if you aren't aware of that
>> feature.
>
> What is the potential harm?

The harm, for example, could be that you're using history to recall a
series of commands in one shell and did a destructive one in another
terminal. Then you continue with your series of commands and destroy
something.

I know, I know. This cannot happen, because people _always_ double check
before they hit enter. Oh wait! Why was I so grateful, that I a backup a
couple of times in the past? :-)


But more seriously: The feature does violate the principle of least
surprise. It's okay that zsh _has_ this option. It is also okay that you
_like_ it. But enabling it should be a conscious decision by you, the
user. It should not be the default.


>> This is why I'd like to disable this setting by default (but provide
>> it as commented feature so it's trivial to just enable it on
>> request). Of course you will be able to just customize it via e.g.
>> .zshrc.local, it's really just about the default behaviour.
>
> What will happen then?

Well, the feature will be disabled unless we get hordes of users that
scream at us. Actually, screaming doesn't help. A convincing argument
might.

In case we change _our_ default (again, this default DIFFERS from zsh's
default settings), then you can get the old behaviour be adding the
following to your `~/.zshrc.local':

  setopt share_history

Then for you, nothing changes.

Regards, Frank


More information about the Grml mailing list