From c61013485fc9610eb55c8fdba21b45817c217f3e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 22 Mar 2013 21:12:07 -0400 Subject: [PATCH] Safety net aliases for dangerous commands (like rm) --- zsh/aliases | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/zsh/aliases b/zsh/aliases index 416b540b..fa9db0ae 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -8,8 +8,23 @@ alias la='ls -la' alias l.='ls -Ad .*' alias du='du -h -d 1' alias q='exit' +alias sha1='openssl sha1' +alias mkdir='mkdir -pv' +# Resume download if possible +alias wget='wget -c' -# Apps ######################### +# Safety nets +alias mv='mv -i' +alias cp='cp -i' +alias ln='ln -i' +# do not delete / or prompt if deleting more than 3 files at a time # +alias rm='rm -I --preserve-root' + +alias chown='chown --preserve-root' +alias chmod='chmod --preserve-root' +alias chgrp='chgrp --preserve-root' + +# vim if command_exists mvim; then alias v='mvim' else