dotfiles/.config/zsh/aliases.zsh

61 lines
1.7 KiB
Bash
Raw 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'
2022-05-02 13:26:24 +02:00
## Use flatpak vscodium
alias codium="flatpak run com.vscodium.codium --no-sandbox "
2021-04-02 19:06:33 +02:00
## navigation
alias ..='cd ..'
alias ...='cd ../..'
## 'ls' to 'exa'
alias ls='exa --long --color=always --group-directories-first --classify'
alias la='exa --all --long --color=always --group-directories-first --classify'
alias ll='exa --long --color=always --group-directories-first --classify'
alias l.='exa --all --list-dirs --long --color=always --group-directories-first --classify .*'
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
## TODO 'delta' instead of 'git diff'
## 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'