dotfiles/.config/oh-my-zsh/aliases.zsh

45 lines
1 KiB
Bash
Raw Normal View History

2021-04-02 19:06:33 +02:00
# general aliases
## Alias handling
2021-04-16 12:04:30 +02:00
alias editalias='vim $HOME/.config/oh-my-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 'exa'
alias ls='exa -l --color=always --group-directories-first --classify'
alias la='exa -al --color=always --group-directories-first --classify'
alias ll='exa -l --color=always --group-directories-first --classify'
alias l.='exa -ald --color=always --group-directories-first --classify .*'
2021-04-02 19:06:33 +02:00
## 'grep' to 'rg' -> 'ripgrep'
alias grep='rg'
## 'cat' to 'bat'
alias cat='bat'
## TODO 'delta' instead of 'git diff'
## confirm before overwriting files
alias cp="cp -i"
alias mv='mv -i'
alias rm='rm -i'
## adding flags
alias df='df -h'
alias free='free -m'
alias du='du -h -d 2'
2021-04-02 19:06:33 +02:00
## color and condense ip output
alias ipa='ip -br -c addr show'
alias ipl='ip -br -c link show'
## always spawn new window for firefox
alias firefox='firefox --new-window'