dotfiles/files/.bash_aliases
2023-05-04 23:28:42 -04:00

39 lines
1.4 KiB
Bash

# docker
alias dcpull='docker compose pull && docker compose down --remove-orphans && docker compose up -d'
alias dprune='docker image prune -f'
alias dcrestart='docker compose down --remove-orphans && docker compose up -d'
alias docker='docker '
alias ps='ps -a --format "table {{.Names}}:\t{{.State}}"'
alias ncht='docker exec -it --user www-data app-server php occ maintenance:update:htaccess'
# ssh and friends
alias tup='tailscale up --login-server https://headscale.nelim.org'
alias pve='ssh matt@10.0.0.121'
alias mc='ssh mc@10.0.0.124'
alias pod='ssh -p 6768 matt@10.0.0.122'
alias oksys='ssh matt@10.0.0.213'
alias router='ssh root@10.0.0.2'
alias jelly='ssh matt@10.0.0.123'
# add default flags
alias tmux='tmux -2'
alias ls='ls -lah --color=auto'
alias cp='cp -r'
# privileged
alias sudo='sudo '
alias frick='sudo $(fc -ln -1)'
alias grubup='grub-mkconfig -o /boot/grub/grub.cfg ; sudo sed -i 's/echo/#ech~o/g' /boot/grub/grub.cfg'
alias yay='paru'
# check autocompletion
wget -q https://raw.githubusercontent.com/Jguer/yay/next/completions/bash -O ~/out.tmp
[ $(diff -q ~/out.tmp /usr/share/bash-completion/completions/paru.bash) ] && echo "Bash completion for yay is wrong. Run this : sudo wget https://raw.githubusercontent.com/Jguer/yay/next/completions/bash -O /usr/share/bash-completion/completions/paru.bash"
rm ~/out.tmp
source /usr/share/bash-completion/completions/paru.bash