From 78101b75ad63a358e89e65baa9a95dbccf691881 Mon Sep 17 00:00:00 2001 From: Tomasz Pala Date: Sun, 16 Oct 2016 11:09:19 +0200 Subject: [PATCH] blacklist some dangerous commands from shell history --- zshrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zshrc b/zshrc index 85c34bb..96c0d75 100644 --- a/zshrc +++ b/zshrc @@ -2,8 +2,21 @@ alias which=whence alias cd='builtin cd' + +# mc: don't clutter history alias precmd=' precmd' +# avoid accidental execution from history by inhibiting saving in the first place +# (easier to mitigate than HISTORY_IGNORE, which in turn might be used for mkfs*) +alias kill=' kill' +alias halt=' halt' +alias init=' init' +alias poweroff=' poweroff' +alias reboot=' reboot' +alias runlevel=' runlevel' +alias shutdown=' shutdown' +alias telinit=' telinit' + # SYSTEM WIDE ALIASES ETC. for i in /etc/shrc.d/**/*.sh(N); do . $i -- 2.44.0