12
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Pecoを使ってgitignore.ioから好きなように.gitignoreを取得する

Last updated at Posted at 2014-07-13

以下を~/.zshrcに追記します

~/.zshrc
function _gi() { curl -s https://www.gitignore.io/api/$1 ;}
alias gi='_gi $(_gi list | sed "s/,/\n/g" | peco )'

Macの場合はsedがBSD版なのでGNU sedを使う
brew install gnu-sed でインストール

その後に以下を追記

~/.zshrc
function _gi() { curl -s https://www.gitignore.io/api/$1 ;}
alias gi='_gi $(_gi list | gsed "s/,/\n/g" | peco )'

gi >.gitignoreで.gitignoreを取得できるようになりました。

まだzshを使って間もないですのでもっと簡易に書ける方法があればご教示くださいm(_ _)m

12
13
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?