utils/bash/bashrc/sources/10_aliases

41 lines
943 B
Bash
Executable File

#!/bin/bash
# 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'
# directory navigations
alias p=pushd
alias pp='pushd +2'
alias p3='pushd +3'
alias p4='pushd +4'
alias o=popd
alias d='dirs -v'
# fast greps
alias grep='grep --color=auto --exclude=\.svn'
alias grepphp='grep -n --include=*.php'
alias grepjs='grep -n --include=*.js'
# Wget prefix
alias wget='wget --directory-prefix="$HOME/Downloads"'
# ssh-agent key lifetime
alias ssh-add="ssh-add -t 43200"
# Pretty print sqlite3
alias sqlite3="sqlite3 -header -column"