From aad91beb3c60bab04a09a10fa56c56b469251cd3 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 11 Jul 2017 11:52:47 -0700 Subject: [PATCH] [utility] Move the safeops aliases into their own section and add XXi variants --- modules/utility/init.zsh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index dd6158a6..e9c20b21 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -73,15 +73,21 @@ alias mkdir="${aliases[mkdir]:-mkdir} -p" alias p='${(z)PAGER}' alias po='popd' alias pu='pushd' -if zstyle -T ':prezto:module:utility' safe-ops; then - alias rm="${aliases[rm]:-rm} -i" - alias mv="${aliases[mv]:-mv} -i" - alias cp="${aliases[cp]:-cp} -i" - alias ln="${aliases[ln]:-ln} -i" -fi alias sa='alias | grep -i' alias type='type -a' +# Safe ops. Ask the user before doing anything destructive. +alias rmi="${aliases[rm]:-rm} -i" +alias mvi="${aliases[mv]:-mv} -i" +alias cpi="${aliases[cp]:-cp} -i" +alias lni="${aliases[ln]:-ln} -i" +if zstyle -T ':prezto:module:utility' safe-ops; then + alias rm="${aliases[rm]:-rm} -i" + alias mv="${aliases[mv]:-mv} -i" + alias cp="${aliases[cp]:-cp} -i" + alias ln="${aliases[ln]:-ln} -i" +fi + # ls if is-callable 'dircolors'; then # GNU Core Utilities