diff --git a/dotfiles/.local/aliases b/dotfiles/.local/aliases index b780ae85..10fd5b19 100644 --- a/dotfiles/.local/aliases +++ b/dotfiles/.local/aliases @@ -9,9 +9,6 @@ alias connections='nm-connection-editor' # Make copy command verbose alias cp='cp -v' -# Copies with a progress bar -alias cpv='rsync -ah --info=progress2' - # Command-line DNS utility alias dog="docker run -it --rm dog" diff --git a/dotfiles/.local/functions b/dotfiles/.local/functions index f1a7b4b4..779da54b 100644 --- a/dotfiles/.local/functions +++ b/dotfiles/.local/functions @@ -19,6 +19,11 @@ cl() { ls -F --color=auto } +# Safer cp with progress bar and backup to /tmp +cpv() { + rsync -pogbr -hhh --backup-dir="/tmp/rsync-${USERNAME}" -e /dev/null --progress "$@" +} + # Checks status of a website on downforeveryoneorjustme.com down4me() { curl -s "http://www.downforeveryoneorjustme.com/$1" | sed '/just you/!d;s/<[^>]*>//g' diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index f8930d6b..f5c64c35 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -250,21 +250,18 @@ esac # eval "$(gdircolors -b "$HOME/.config/dircolors")" #fi -### Backup aliases (so oh-my-zsh does not apply any aliases) -save_aliases=$(alias -L) - ### Antigen if [ -f "$HOME/.local/antigen.zsh" ]; then source "$HOME/.local/antigen.zsh" fi if command -v antigen > /dev/null; then + alias alias=true antigen use oh-my-zsh antigen bundle adb antigen bundle colored-man-pages antigen bundle command-not-found antigen bundle copyfile antigen bundle copybuffer - antigen bundle cp antigen bundle docker antigen bundle docker-compose antigen bundle encode64 @@ -306,12 +303,9 @@ if command -v antigen > /dev/null; then antigen bundle marlonrichert/zsh-autocomplete@main antigen theme romkatv/powerlevel10k antigen apply + unalias alias fi -### Clear oh-my-zsh aliases -eval $save_aliases -unset save_aliases - ### ZSH Autocomplete zstyle ':autocomplete:*' list-lines 14 zstyle ':autocomplete:history-search:*' list-lines 14