Skip to content

Instantly share code, notes, and snippets.

@noahmorrison
Created November 25, 2014 16:02
Show Gist options
  • Save noahmorrison/e951890796efaae09131 to your computer and use it in GitHub Desktop.
Save noahmorrison/e951890796efaae09131 to your computer and use it in GitHub Desktop.
Gitignore integrated ls
ls_alias="ls --color=auto"
while read line
do
if [[ $line ]] && [[ ${line:0:1} != '#' ]]
then
export ls_alias+=" -I \"$line\""
fi
done < ~/.gitignore
alias ls=$ls_alias
alias la='ls -A'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment