dotfiles/files/.bash_aliases

44 lines
1.4 KiB
Bash
Raw Normal View History

2023-03-18 02:26:01 -04:00
# docker
2023-03-18 14:57:13 -04:00
alias dcpull='docker compose pull && docker compose down --remove-orphans && docker compose up -d'
2022-12-17 00:37:53 -05:00
alias dprune='docker image prune -f'
2023-03-18 14:57:13 -04:00
alias dcrestart='docker compose down --remove-orphans && docker compose up -d'
2023-02-06 23:53:41 -05:00
alias docker='docker '
2023-03-23 09:10:47 -04:00
alias ps='ps -a --format "table {{.Names}}:\t{{.State}}"'
2022-12-17 00:37:53 -05:00
alias ncht='docker exec -it --user www-data app-server php occ maintenance:update:htaccess'
2023-03-18 02:26:01 -04:00
# ssh and friends
alias tup='tailscale up --login-server https://headscale.nelim.org'
2023-02-16 09:35:59 -05:00
2023-01-08 11:24:16 -05:00
alias pve='ssh matt@10.0.0.121'
2022-12-28 15:38:02 -05:00
alias mc='ssh mc@10.0.0.124'
2023-03-19 17:30:05 -04:00
alias pod='ssh -p 6768 matt@10.0.0.122'
2022-12-17 00:37:53 -05:00
alias oksys='ssh matt@10.0.0.213'
alias router='ssh root@10.0.0.2'
2023-03-15 11:05:58 -04:00
alias jelly='ssh matt@10.0.0.123'
2023-05-07 22:57:53 -04:00
alias qbit='ssh matt@10.0.0.128'
2022-12-17 00:37:53 -05:00
2023-03-18 02:26:01 -04:00
# add default flags
2023-04-25 23:21:21 -04:00
alias tmux='tmux -2'
2022-12-17 00:37:53 -05:00
alias ls='ls -lah --color=auto'
2023-03-17 22:00:48 -04:00
alias cp='cp -r'
2023-01-08 11:24:16 -05:00
2023-02-04 04:20:08 -05:00
2023-03-18 02:26:01 -04:00
# privileged
2023-02-04 04:20:08 -05:00
alias sudo='sudo '
2023-02-19 21:48:11 -05:00
alias frick='sudo $(fc -ln -1)'
2023-03-02 11:11:20 -05:00
alias grubup='grub-mkconfig -o /boot/grub/grub.cfg ; sudo sed -i 's/echo/#ech~o/g' /boot/grub/grub.cfg'
2023-05-05 01:49:05 -04:00
if [ -x "$(command -v paru)" ]; then
2023-05-04 23:22:38 -04:00
alias yay='paru'
# check autocompletion
wget -q https://raw.githubusercontent.com/Jguer/yay/next/completions/bash -O ~/out.tmp
2023-05-07 19:36:35 -04:00
[[ $(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"
2023-05-04 23:22:38 -04:00
rm ~/out.tmp
2023-05-04 23:28:42 -04:00
source /usr/share/bash-completion/completions/paru.bash
2023-05-05 01:49:05 -04:00
fi