Skip to content

Instantly share code, notes, and snippets.

@arsu-leo
Last active March 15, 2023 08:53
Show Gist options
  • Save arsu-leo/a0bb922e57204564e97650504fe613bc to your computer and use it in GitHub Desktop.
Save arsu-leo/a0bb922e57204564e97650504fe613bc to your computer and use it in GitHub Desktop.
Some usefull aliases por better listing and color support on bash output
#cat << EOF >> .bash_aliases
#Add this into your .bashrc
#if [ -f ~/.bash_aliases ]; then
# . ~/.bash_aliases
#fi
#Some aliases
if [ -x /usr/bin/dircolors ]; then
COLOR_SUPPORT='--color=auto '
else
COLOR_SUPPORT=''
fi
alias grep="grep $COLOR_SUPPORT"
alias fgrep="fgrep $COLOR_SUPPORT"
alias egrep="egrep $COLOR_SUPPORT"
alias ls="ls $COLOR_SUPPORT"
alias l="ls $COLOR_SUPPORT -lhatr"
alias ll="ls $COLOR_SUPPORT -alF"
alias la="ls $COLOR_SUPPORT -A"
alias cd='cd -P'
alias dir="dir $COLOR_SUPPORT"
alias vdir="vdir $COLOR_SUPPORT"
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment