2020-05-31 14:16:51 +02:00
|
|
|
#
|
|
|
|
# Aliases
|
|
|
|
#
|
|
|
|
|
|
|
|
abbr v 'vi'
|
|
|
|
alias vi 'nvim'
|
|
|
|
alias vim 'nvim'
|
|
|
|
|
|
|
|
abbr l "ls -lFh"
|
|
|
|
alias ls 'ls --color=auto'
|
|
|
|
abbr la "ls -lAFh"
|
|
|
|
abbr lt 'ls -ltFh'
|
|
|
|
abbr lS 'ls -1FSsh'
|
|
|
|
abbr ll "ls -l"
|
|
|
|
abbr l1 "ls -1"
|
|
|
|
abbr sl 'ls'
|
2023-08-07 13:13:54 +02:00
|
|
|
alias ip 'ip -c'
|
2020-05-31 14:16:51 +02:00
|
|
|
alias tree 'tree -C'
|
|
|
|
|
|
|
|
# Configuration files
|
|
|
|
abbr fishrc 'vi ~/.config/fish/config.fish'
|
|
|
|
abbr envconf 'vi ~/.config/environment'
|
|
|
|
abbr bashrc 'vi ~/.bashrc'
|
|
|
|
abbr nviminit 'vi ~/.config/nvim/init.vim'
|
|
|
|
abbr alacrittyconf 'vi ~/.config/alacritty/alacritty.yml'
|
|
|
|
abbr tmuxconf 'vi ~/.tmux.conf'
|
|
|
|
abbr swayconf 'vi ~/.config/sway/config'
|
|
|
|
abbr swayconfhost 'vi ~/.config/sway/(hostname)'
|
|
|
|
abbr aliases 'vi ~/.config/aliases; source ~/.config/aliases'
|
|
|
|
|
|
|
|
# Git
|
|
|
|
abbr gst "git status"
|
|
|
|
abbr gd "git diff"
|
|
|
|
abbr gdh "git diff HEAD"
|
|
|
|
abbr gc "git clone $1 $2"
|
|
|
|
abbr gcl "git clean -fdx"
|
|
|
|
abbr gcm "git commit"
|
|
|
|
abbr ga "git add -u ."
|
|
|
|
abbr gaa "git add -A ."
|
|
|
|
abbr gpo "git push origin $1"
|
|
|
|
abbr glo "git log --oneline"
|
|
|
|
abbr grhh "git reset --hard HEAD"
|
|
|
|
abbr gcp "git cherry-pick $1"
|
|
|
|
|
|
|
|
# Archives
|
|
|
|
abbr tgz 'tar -xvzf' # extract .tar.gz
|
|
|
|
abbr tbz 'tar -xvjf' # extract .tar.bz2
|
|
|
|
|
2023-08-07 13:13:54 +02:00
|
|
|
# Linux specific aliases
|
|
|
|
if [ (uname) = "Linux" ]
|
|
|
|
# Pacman
|
|
|
|
alias pacman 'pacman --color=auto'
|
|
|
|
abbr pm 'pacman'
|
|
|
|
abbr pms 'pacman -Ss'
|
|
|
|
abbr pmsi 'pacman -Sii'
|
|
|
|
abbr pmq 'pacman -Qs'
|
|
|
|
abbr pmqi 'pacman -Qii'
|
|
|
|
abbr pmqo 'pacman -Qo'
|
|
|
|
abbr pmqm 'pacman -Qem' #list foreign (explicit) packages
|
|
|
|
abbr pmi 'sudo pacman -S'
|
|
|
|
abbr pmr 'sudo pacman -Rns'
|
|
|
|
abbr pmu 'sudo pacman -Syu'
|
|
|
|
abbr pmro 'sudo pacman -Rns (pacman -Qtdq) #remove orphans'
|
|
|
|
abbr pmcc 'pacman -Qii | awk '\''/^MODIFIED/ {print $2}'\''' #list changed config files
|
|
|
|
abbr aur 'auracle'
|
|
|
|
|
|
|
|
abbr open 'xdg-open'
|
|
|
|
end
|
|
|
|
|
|
|
|
# MacOS specific aliases
|
|
|
|
if [ (uname) = "Darwin" ]
|
|
|
|
alias tailscale "/Applications/Tailscale.app/Contents/MacOS/Tailscale"
|
|
|
|
end
|
|
|
|
|
|
|
|
# Machine specific aliases
|
|
|
|
if test -e "$XDG_CONFIG_HOME/$(hostname).aliases"
|
|
|
|
source "$XDG_CONFIG_HOME/$(hostname).aliases"
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2020-05-31 14:16:51 +02:00
|
|
|
# EOF
|