dotfiles/.config/zsh/aliases.zsh

54 lines
1.4 KiB
Bash
Raw Permalink Normal View History

2021-04-02 19:06:33 +02:00
# general aliases
## Alias handling
2022-05-02 13:26:24 +02:00
alias editalias='vim $HOME/.config/zsh/aliases.zsh'
alias updatealias='exec zsh'
2021-04-02 19:06:33 +02:00
## 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'
2024-05-26 20:29:17 +02:00
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'
2021-04-02 19:06:33 +02:00
## 'grep' to 'rg' -> 'ripgrep'
alias grep='rg'
alias nocomment="rg --invert-match '''^\s*(#|$)'''"
2021-04-02 19:06:33 +02:00
## 'cat' to 'bat'
alias cat='bat'
2022-09-17 21:52:03 +02:00
## use 'drill' instead of 'dig' to drop bind package
alias dig='drill'
2021-04-02 19:06:33 +02:00
## 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'
2021-04-02 19:06:33 +02:00
## adding flags
alias df='df --human-readable'
alias free='free --human'
2021-08-17 11:48:42 +02:00
alias du='du --human-readable --max-depth 2'
alias wget='wget --continue'
2021-04-02 19:06:33 +02:00
## color and condense ip output
alias ipa='ip --brief --color addr show'
alias ipl='ip --brief --color link show'
2021-04-02 19:06:33 +02:00
## always spawn new window for firefox
alias firefox='firefox --new-window'
## always use cat output format for journal logs
alias journalctl='journalctl --output=cat'