.zshrc
function download_gitignore () { wget --no-check-certificate "https://raw.github.com/github/gitignore/master/$1.gitignore" mv -i "$1.gitignore" ".gitignore" cat ".gitignore" }
実行
例)Rails.gitignore をダウンロードする
$ download_gitignore Rails
実行結果
--2013-11-07 22:51:17-- https://raw.github.com/github/gitignore/master/Rails.gitignore Resolving raw.github.com (raw.github.com)... 103.245.222.133 Connecting to raw.github.com (raw.github.com)|103.245.222.133|:443... connected. WARNING: The certificate of ‘raw.github.com’ is not trusted. WARNING: The certificate of ‘raw.github.com’ hasn't got a known issuer. HTTP request sent, awaiting response... 200 OK Length: 222 [text/plain] Saving to: ‘Rails.gitignore’ 100%[===========================================================================================================================================================>] 222 --.-K/s in 0s 2013-11-07 22:51:18 (2.55 MB/s) - ‘Rails.gitignore’ saved [222/222] *.rbc *.sassc .sass-cache capybara-*.html .rspec .rvmrc /.bundle /vendor/bundle /log/* /tmp/* /db/*.sqlite3 /public/system/* /coverage/ /spec/tmp/* **.orig rerun.txt pickle-email-*.html config/initializers/secret_token.rb