Skip to content

Instantly share code, notes, and snippets.

@dustindorroh
Last active July 19, 2019 20:24
Show Gist options
  • Save dustindorroh/66c98d360d147208e7c4 to your computer and use it in GitHub Desktop.
Save dustindorroh/66c98d360d147208e7c4 to your computer and use it in GitHub Desktop.
# 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
# ls variations
alias ll='ls -alF'
alias la='ls -a'
alias lt='ls -lt'
alias lg='ls . | grep'
# one letter
alias j='jobs -lo'
alias e='echo'
alias c='cat'
alias h='history | grep '
alias n='nautilus'
alias g='grep'
alias l=less
# Random
alias pu='pushd'
alias po='popd'
# Useful for programming & debugging
alias ret='echo $?' # echo return value
alias emacs='emacs -nw'
alias cls='printf "\033c"'
alias hl='history| cut -c8- | less'
alias nvidia-top='watch --color "nvidia-smi | /usr/bin/python3 ~/repos/nvidia-htop/nvidia-htop.py -c"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment