dotfiles/.config/oh-my-zsh/aliases.zsh
histalek c4e992ab98
zsh: Change how updatealias reloads zsh
Seems like reloading zsh via sourcing .zshrc is a bad idea [1]. The best
way seems to be to completely restart zsh or at least use 'exec zsh'.

[1] https://github.com/romkatv/powerlevel10k#weird-things-happen-after-typing-source-zshrc
2021-07-12 17:22:45 +02:00

44 lines
1 KiB
Bash

# general aliases
## Alias handling
alias editalias='vim $HOME/.config/oh-my-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 '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 .*'
## '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'
## 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'