From a77bee5b4ebbeca5ada792b06a86266e9b8c7119 Mon Sep 17 00:00:00 2001 From: BlackNet Dev Date: Fri, 15 May 2020 22:09:01 +0200 Subject: [PATCH] alias for arch manajro and debian --- rainbow-alias.plugin.zsh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 rainbow-alias.plugin.zsh diff --git a/rainbow-alias.plugin.zsh b/rainbow-alias.plugin.zsh new file mode 100644 index 0000000..d24f230 --- /dev/null +++ b/rainbow-alias.plugin.zsh @@ -0,0 +1,34 @@ + + +if (( $+commands[lsd] )); then + alias ls='lsd --color=auto' +else + alias ls='ls --color=auto' +fi +alias ll='ls -al' + +if (( $+commands[pacman-mirrors] )); then + updmirror='sudo pacman-mirrors -f0 && sudo pacman -Sy' +fi + +if (( $+commands[pacman-mirrors] )); then + updmirror='sudo reflector -l 200 -n 20 -p http --sort rate --save /etc/pacman.d/mirrorlist && sudo pacman -Sy' +fi + +if (( $+commands[yay] )); then + alias update='yay -Syyu --noconfirm' +fi + +if (( $+commands[pacman] )); then + alias update='pacman -Syyu --noconfirm' +fi + +if (( $+commands[apt] )); then + alias update='sudo apt update; sudo apt upgrade -y' +fi + +if [[ '$TERM' != screen* ]]; then + if (( $+commands[neofetch] )); then + neofetch + fi +fi \ No newline at end of file