Files
rainbow-zsh-theme/rainbow-alias.plugin.zsh
T
2024-08-04 10:41:01 +02:00

73 lines
1.9 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
if (( $+commands[lsd] )); then
alias ls='lsd --color=auto'
else
alias ls='ls --color=auto'
fi
alias ll='ls -al'
if (( $+commands[eza] )); then
alias ls='eza --color=always --icons --group-directories-first' # my preferred listing
alias la='eza -a --color=always --icons --group-directories-first' # all files and dirs
alias ll='eza -a -l --color=always --icons --group-directories-first' # long format
alias lt='eza -aT --color=always --icons --group-directories-first' # tree listing
fi
if (( $+commands[pacman-mirrors] )); then
alias updmirror='sudo pacman-mirrors -f0 && sudo pacman -Sy'
fi
if (( $+commands[reflector] )); then
alias updmirror='sudo reflector -l 200 -n 20 -p http --sort rate --save /etc/pacman.d/mirrorlist && sudo pacman -Sy'
fi
if (( $+commands[pacman] )); then
alias update='pacman -Syyu --noconfirm'
fi
if (( $+commands[yay] )); then
alias update='yay -Syyu --noconfirm'
fi
if (( $+commands[apt] )); then
alias update='sudo apt update; sudo apt upgrade -y'
fi
if (( $+commands[bat] )); then
alias cat='bat'
fi
if (( $+commands[docker] )); then
alias dc='docker compose'
alias dcu='docker compose up -d'
alias dcub='docker compose up -d --build'
alias dcd='docker compose down'
alias dck='docker compose kill'
alias dcr='docker compose restart'
alias dcst='docker compose start'
alias dcsp='docker compose stop'
alias dcp='docker compose pull'
fi
alias rm='rm -rf'
if [[ '$TERM' == screen* ]]; then
if (( $+commands[neofetch] )); then
neofetch
fi
else
if (( $+commands[neofetch] && $+commands[lolcat] )); then
neofetch | lolcat
fi
fi
# Set Proxy
function setproxy() {
export {http,https,ftp}_proxy="http://vm-ubuntu-docker:8888"
export no_proxy=localhost,127.0.0.1,192.168.16.0/24
}
# Unset Proxy
function unsetproxy() {
unset {http,https,ftp}_proxy
}