53 lines
1.4 KiB
Bash
53 lines
1.4 KiB
Bash
# general aliases
|
|
|
|
## Alias handling
|
|
alias editalias='vim $HOME/.config/zsh/aliases.zsh'
|
|
alias updatealias='exec zsh'
|
|
|
|
## https://www.atlassian.com/git/tutorials/dotfiles
|
|
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
|
|
|
## navigation
|
|
alias ..='cd ..'
|
|
alias ...='cd ../..'
|
|
|
|
## 'ls' to 'eza'
|
|
alias ls='eza --long --color=always --group-directories-first --classify --icons --git'
|
|
alias la='eza --all --long --color=always --group-directories-first --classify --icons --git'
|
|
|
|
## 'grep' to 'rg' -> 'ripgrep'
|
|
alias grep='rg'
|
|
alias nocomment="rg --invert-match '''^\s*(#|$)'''"
|
|
|
|
## 'cat' to 'bat'
|
|
alias cat='bat'
|
|
|
|
## use 'drill' instead of 'dig' to drop bind package
|
|
alias dig='drill'
|
|
|
|
## confirm before overwriting files
|
|
alias cp='cp --interactive'
|
|
alias mv='mv --interactive'
|
|
alias ln='ln --interactive'
|
|
alias rm='rm --interactive=always --preserve-root'
|
|
|
|
## safety nets for changing permissions on /
|
|
alias chown='chown --preserve-root'
|
|
alias chmod='chmod --preserve-root'
|
|
alias chgrp='chgrp --preserve-root'
|
|
|
|
## adding flags
|
|
alias df='df --human-readable'
|
|
alias free='free --human'
|
|
alias du='du --human-readable --max-depth 2'
|
|
alias wget='wget --continue'
|
|
|
|
## color and condense ip output
|
|
alias ipa='ip --brief --color addr show'
|
|
alias ipl='ip --brief --color link show'
|
|
|
|
## always spawn new window for firefox
|
|
alias firefox='firefox --new-window'
|
|
|
|
## always use cat output format for journal logs
|
|
alias journalctl='journalctl --output=cat'
|