Skip to content

Instantly share code, notes, and snippets.

@kaosf
Created May 26, 2014 08:23
Show Gist options
  • Save kaosf/b20a937ce4611c7bfa02 to your computer and use it in GitHub Desktop.
Save kaosf/b20a937ce4611c7bfa02 to your computer and use it in GitHub Desktop.
addtogitignore () {
if [ $# -lt 1 ]
then
return 1
fi
local PARAMS=$(echo $@ | sed 's/ /,/g')
curl www.gitignore.io/api/$PARAMS >> .gitignore 2> /dev/null
echo "Executed \"curl www.gitignore.io/api/$PARAMS >> .gitignore\""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment