gibo 2.x系で使い方が微妙に変わっていた

gibo は、github/gitignore で公開されている内容をもとに .gitignoreファイルを自動生成するツールですが、久しぶりに使ってみたら使い方が微妙に変わっていたので自分メモです。

インストール

mac の場合は homebrew でインストールします。

$ brew install gibo

その他の環境は 公式のREADME が参考になります。

バージョン確認

$ gibo version
gibo 2.1.0 by Simon Whitaker <sw@netcetera.org>
https://github.com/simonwhitaker/gibo

helpを確認

help を確認すると、.gitignore の生成方法が gibo dump に変わっているのが確認できます。以前は gibo Go >> .gitignore みたいな使い方でした。

$ gibo help
gibo 2.1.0 by Simon Whitaker <sw@netcetera.org>
https://github.com/simonwhitaker/gibo

Fetches gitignore boilerplates from https://github.com/github/gitignore

Usage:
    gibo [command]

Example:
    gibo dump Swift Xcode >> .gitignore

Commands:
    dump BOILERPLATE...   Write boilerplate(s) to STDOUT
    help                  Display this help text
    list                  List available boilerplates
    search STR            Search for boilerplates with STR in the name
    update                Update list of available boilerplates
    version               Display current script version

自動生成可能な言語や環境を列挙する

以前は gibo --list でしたが、gibo list に変わっています。

$ gibo list
=== Languages ===

Actionscript        Drupal          Jekyll          Perl            Stella
Ada         Eagle           Joomla          Perl6           SugarCRM
Agda            Elisp           Julia           Phalcon         Swift
Android         Elixir          KiCad           PlayFramework       Symfony
AppceleratorTitanium    Elm         Kohana          Plone           SymphonyCMS
AppEngine       EPiServer       Kotlin          Prestashop      Terraform
ArchLinuxPackages   Erlang          LabVIEW         Processing      TeX
Autotools       ExpressionEngine    Laravel         PureScript      Textpattern
C++         ExtJs           Leiningen       Python          TurboGears2
C           Fancy           LemonStand      Qooxdoo         Typo3
CakePHP         Finale          Lilypond        Qt          Umbraco
CFWheels        ForceDotCom     Lithium         R           Unity
ChefCookbook        Fortran         Lua         Rails           UnrealEngine
Clojure         FuelPHP         Magento         RhodesRhomobile     VisualStudio
CMake           Gcov            Maven           ROS         VVVV
CodeIgniter     GitBook         Mercury         Ruby            Waf
CommonLisp      Go          MetaProgrammingSystem   Rust            WordPress

~ 以下省略 ~

.gitignoreを自動生成

先ほど help でも確認しましたが、今は gibo dump を使うみたいですね。さっそく Go の .gitignoreファイルを自動生成してみましょう。

$ gibo dump Go >> .gitignore

$ cat .gitignore
/vendor/
/.idea
gibo 2.1.0 by Simon Whitaker <sw@netcetera.org>
https://github.com/simonwhitaker/gibo
### https://raw.github.com/github/gitignore/ea28c14da0faf75047165c10223635ba95566ad7/Go.gitignore

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

生成できましたね。

今回は以上になります。