1
0
Fork 0
mirror of https://github.com/kastdeur/dotfiles.git synced 2025-06-01 20:09:13 +02:00

Moved bash/main into scriptlets. Added to main bashrc

This commit is contained in:
Eric-Teunis de Boone 2016-10-02 23:49:56 +02:00
parent 7a82ebe7f1
commit 811a903869
6 changed files with 7 additions and 5 deletions

31
bash/scriptlets/aliases Normal file
View file

@ -0,0 +1,31 @@
# 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'
fi
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
# Use vim if possible instead of vi
if [[ $(command -v vim) ]]; then
alias vi='vim'
fi
# 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 ..'