Created
November 17, 2022 16:26
-
-
Save saxbophone/845524793b98093d085c9179d8a99eb1 to your computer and use it in GitHub Desktop.
Generate .gitignore files for given languages straight from the comfort of the UNIX shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by Joshua Saxby 2022 | |
# This BASH shell script function is placed into the Public Domain | |
# There are no restrictions on its use but it is provided with ABSOLUTELY no liability, warranty, etc, etc... | |
# !!don't sue me for using it at your own risk...!! | |
# uses the new version of the former gitignore.io API to generate gitignore files for given languages | |
# usage: $ gitignore <lang 1> <lang 2> ... <lang n> | |
# | |
# NOTE: overwrites local .gitignore file in-place | |
function gitignore() { | |
local lang_list=$(echo "$*" | tr " " ,); | |
wget "https://www.toptal.com/developers/gitignore/api/$lang_list" -O .gitignore; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment