dotfiles/.bash_aliases

38 lines
870 B
Bash
Raw Normal View History

2018-12-03 13:33:45 +01:00
theos=$(uname -s)
case $theos in
"Darwin" )
alias ls='ls -G';;
"Linux" )
alias ls='ls --color=auto';;
esac
2019-06-17 09:33:56 +02:00
alias grep='grep --color -s'
2014-01-21 21:22:32 +01:00
alias l='ls -lhatr'
2017-04-20 23:27:48 +02:00
#alias ls='ls --color=auto'
alias rm='rm -i'
2014-01-21 21:22:32 +01:00
# Git stuff
alias gdp='git diff --color HEAD^ HEAD'
alias gl='git log --pretty=format:"%Cgreen%h %Creset %s %Cgreenby %an (%ar) %Cred %d" --graph'
alias gdc='git diff --color'
2015-12-12 23:23:56 +01:00
alias gst='git status'
2018-12-03 13:33:45 +01:00
alias grp='git remote prune origin'
2014-01-21 21:22:32 +01:00
2018-12-11 10:38:06 +01:00
# Docker
alias dockerkillall='docker kill $(docker ps -q)'
2018-12-11 10:39:23 +01:00
alias dockerdelall='docker rm $(docker ps -qa)'
2018-12-11 10:38:06 +01:00
2014-01-21 21:22:32 +01:00
# export standard terminal for remote connections
#alias ssh='export TERM=xterm && ssh'
alias hexdump='hexdump -c'
alias pwgen='pwgen -B -s'
# open multiple files in tabs
#alias vim='vim -p'
alias vim='nvim'
2018-12-03 13:33:45 +01:00
if [ $theos == "Darwin" ]; then
alias flushdns='sudo killall -HUP mDNSResponder'
fi