]> git.pld-linux.org Git - packages/zsh.git/commitdiff
blacklist some dangerous commands from shell history
authorTomasz Pala <gotar@pld-linux.org>
Sun, 16 Oct 2016 09:09:19 +0000 (11:09 +0200)
committerTomasz Pala <gotar@pld-linux.org>
Sun, 16 Oct 2016 09:09:19 +0000 (11:09 +0200)
zshrc

diff --git a/zshrc b/zshrc
index 85c34bb57ab793152d9b3ddec3ecc035df535662..96c0d75e9b47f970ee5ce8b0d542622dad853f9d 100644 (file)
--- 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
This page took 0.060508 seconds and 4 git commands to generate.