2016-09-26 15:40:04 +02:00
|
|
|
# enable color support of ls and also add handy aliases
|
|
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
|
|
alias ls='ls --color=auto'
|
|
|
|
alias dir='dir --color=auto'
|
|
|
|
alias vdir='vdir --color=auto'
|
|
|
|
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
2022-02-10 19:41:16 +01:00
|
|
|
alias ip='ip --color=auto'
|
2016-09-26 15:40:04 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# some more ls aliases
|
2016-10-03 10:30:30 +02:00
|
|
|
alias l.='ls -d *'
|
|
|
|
alias ll='ls -l --si -v --group-directories-first'
|
2016-09-26 15:40:04 +02:00
|
|
|
alias la='ls -A'
|
2016-10-03 10:30:30 +02:00
|
|
|
alias lla='ll -A'
|
2016-09-26 15:40:04 +02:00
|
|
|
alias l='ls -CF'
|
|
|
|
|
2022-02-10 19:41:16 +01:00
|
|
|
# make mkdir nicer
|
|
|
|
alias mkdir='mkdir -p -v'
|
|
|
|
|
2016-09-26 15:40:04 +02:00
|
|
|
# Use vim if possible instead of vi
|
|
|
|
if [[ $(command -v vim) ]]; then
|
|
|
|
alias vi='vim'
|
2016-10-05 00:32:06 +02:00
|
|
|
else
|
|
|
|
alias vim='vi'
|
2016-09-26 15:40:04 +02:00
|
|
|
fi
|
2022-02-10 19:41:16 +01:00
|
|
|
alias e="${EDITOR:-vi}"
|
|
|
|
|
|
|
|
# Alias expansion in sudo arguments
|
|
|
|
alias sudo='sudo '
|
2016-09-26 15:40:04 +02:00
|
|
|
|
|
|
|
# Reload bashrc
|
|
|
|
alias bashreload="source ~/.bashrc"
|
|
|
|
|
|
|
|
# Easy calculator instead of bc
|
|
|
|
alias pc='python -ic "from __future__ import division; from math import *"'
|
|
|
|
|
|
|
|
# Moving around
|
|
|
|
alias ~='cd ~'
|
|
|
|
alias ..='cd ..'
|
2022-02-10 19:41:16 +01:00
|
|
|
alias ...='cd ../../'
|
2016-10-03 10:30:30 +02:00
|
|
|
|
|
|
|
# Computer control
|
2016-12-22 02:01:03 +01:00
|
|
|
alias blank='sleep 1s && xset dpms force off'
|
2016-10-03 10:30:30 +02:00
|
|
|
alias lock='blank; xscreensaver-command --lock'
|
2022-02-10 19:47:56 +01:00
|
|
|
|
|
|
|
# whatever
|
|
|
|
alias shrug="echo '¯\_(ツ)_/¯'"
|
|
|
|
alias pinguin="echo 🐧"
|