LoginSignup
2
1

More than 5 years have passed since last update.

github/gitignoreを使って, 複数のパッケージからなるgitignoreをpecoで作る

Last updated at Posted at 2015-09-09

複数のgitignoreパッケージからなるgitignoreファイルを手軽に作りたいとき

ローカルにクローンしたgithub/gitignoreとpecoを使って, 複数のパッケージからなるgitignoreファイルを生成する.

zsh
$ cd GIT_DIR
$ git clone https://github.com/github/gitignore.git

$ mkdir NEW_PRJ

$ cd NEW_PRJ

# xargsがJオプションをサポートしない場合は, "xargs -I% cat % >> .gitignore" に変更
$ ls -d GIT_DIR/gitignore/**/* | peco | xargs -J% cat % > .gitignore

MEMO

pecoで複数行を選択する

ctrl+spaceで複数行を選択できる.

2
1
0

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
2
1