From 9166b4c051f99b3151bf43d7e69a2ce3a7db3351 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 14 Nov 2021 20:58:43 +0100 Subject: [PATCH] Update directory aliases --- home/.config/shell/aliases | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/home/.config/shell/aliases b/home/.config/shell/aliases index dbeac96..5f1ca58 100755 --- a/home/.config/shell/aliases +++ b/home/.config/shell/aliases @@ -8,6 +8,14 @@ alias souce='source' alias suod='sudo ' alias sduo='sudo ' +# Replacements (adding flags) +alias cp='cp -iv' # Ask before overwriting, verbose +alias mv='mv -iv' # Ask before overwriting, verbose +alias rm='trash-put' # Use trash-cli instead of true removal +alias rmr='\rm -v' # True rm, verbose (asking here is too annoying) +alias wget='wget -c' # Resume wget by default +alias df='df -H' # Show sizes as powers of 1000 + # Directory changing alias ..='cd ..' alias ...='cd ../../' @@ -17,29 +25,16 @@ alias .2='cd ../../' alias .3='cd ../../../' alias .4='cd ../../../../' alias .5='cd ../../../../../' -# z.lua script -alias j='z' # for the sake of autojump old habits -alias zz='z -c' # restrict matches to subdirs of $PWD -alias zb='z -b' # restrict matches to parent directories -alias zi='z -I' # cd with interactive fzf selection -alias zbi='z -b -I' # pick parent directory to cd into with fzf # Files/Directories utilities alias mkdir='mkdir -p' alias md='mkdir' alias fhere='find . -name' -alias rr='rm -r' -alias rf='rm -f' -alias rrf='rm -rf' +alias rr='rmr -r' +alias rf='rmr -f' +alias rrf='rmr -rf' alias vimdiff='nvim -d' -# Replacements (adding flags) -alias cp='cp -iv' # Ask before overwriting, verbose -alias mv='mv -iv' # Ask before overwriting, verbose -alias rm='rm -v' # Verbose (asking here is too annoying) -alias wget='wget -c' # Resume wget by default -alias df='df -H' # Show sizes as powers of 1000 - # Directory listing aliases, defaults to exa, if aviable if command -v exa > /dev/null; then alias ls='exa' @@ -75,6 +70,13 @@ alias cfxmonad='vim ~/.config/xmonad/xmonad.hs && xmonad --recompile && xmonad - alias cfxmobar='vim ~/.config/xmobar/xmobarrc.hs && ~/.config/xmobar/multi_mon.sh 2' alias cftodo='vim ~/Personal/vimwiki/todo.md' +# z.lua shortcuts +alias j='z' # for the sake of autojump old habits +alias zz='z -c' # restrict matches to subdirs of $PWD +alias zb='z -b' # restrict matches to parent directories +alias zi='z -I' # cd with interactive fzf selection +alias zbi='z -b -I' # pick parent directory to cd into with fzf + # Python alias py3='python3' alias py2='python2'