-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zsh_aliases
37 lines (31 loc) · 1.4 KB
/
.zsh_aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
alias plugs="nvim ${ZDOTDIR:-$HOME}/.zsh_plugins.txt && source ${ZDOTDIR:-$HOME}/.zshrc"
alias aliases="nvim ${ZDOTDIR:-$HOME}/.zsh_aliases && source ${ZDOTDIR:-$HOME}/.zshrc"
alias zshrc="nvim ${ZDOTDIR:-$HOME}/.zshrc && source ${ZDOTDIR:-$HOME}/.zshrc"
alias saup="sudo apt update -y"
alias saug="sudo apt update -y && sudo apt upgrade -y"
alias sai="sudo apt install -y"
alias sain="sudo apt install -y --no-install-recommends"
alias saar="sudo apt autoremove -y"
alias dotpush="cd ${ZDOTDIR:-$HOME}/dotfiles && git commit -a -m 'Automatic push via alias' && git push && cd -"
alias dotpull="cd ${ZDOTDIR:-$HOME}/dotfiles && git pull && cd - && source ${ZDOTDIR:-$HOME}/.zshrc"
alias dotcheck="cd ${ZDOTDIR:-$HOME}/dotfiles && git status && cd -"
alias n="nvim"
alias la="ls -la"
alias logs="docker compose logs -f -n 100"
alias dlogs="docker logs -f -n 100"
alias up="docker compose up -d --build"
alias down="docker compose down"
alias dpu="docker compose down && git pull && docker compose up -d --build"
alias dpul="dpu && logs"
alias pdu="git pull && docker compose down && docker compose up -d --build"
alias pdul="pdu && logs"
alias "apkc"="update_and_count"
update_and_count() {
apk update > /dev/null 2>&1
local count=$(apk list -u 2>/dev/null | wc -l)
if [ $count -eq 0 ]; then
echo "All packages are up to date."
else
echo "$count packages can be upgraded. Run 'apk list -u' to see them."
fi
}