summaryrefslogblamecommitdiffstats
path: root/bashrc/common/alias.sh
blob: 9712a51d824356d5b53c6038d4bbe60e86b1c033 (plain) (tree)




























                                             



                                            
# command aliases

# ls helpers
alias ll="ls -l"
alias la="ls -la"
alias l="ls -lh"

# cd helpers
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."

# make default what should be default
alias sudo="sudo -H"

# mkdir + chdir
mkcd() {
	mkdir -p $1 && cd $1
}

# create tarball of one directory
mktar() {
	[[ -z "$1" ]] && return 1
	tar cjvf "${1%%/}.tar.bz2" "${1%%/}/"
}

# rar -> unrar
alias rar=unrar

unzip() {
	[[ -f "./${1}" ]] && return 1
	mkcd "${1%%.zip}" && unzip "../${1}"
}