https://github.com/motemen/ghq
いい感じに git のリポジトリ管理するやつ
基本は git clone
と置き換える感じで使う
$ go get github.com/motemen/ghq
$ cd $GOPATH/src/github.com/motemen/ghq
$ make install
これやっとけば go get
した時点で使える気がする
export PATH=$PATH:$GOPATH/bin
ghq の管理ディレクトリはデフォルト ~/.ghq
配下。
これはそのままでよいが、go get
したものは $GOPATH/src
配下に置かれるので両方のディレクトリからリポジトリの検索等を行えるようにする。
https://github.com/motemen/ghq#directory-structures
~/.ghq
|-- code.google.com/
| `-- p/
| `-- vim/
`-- github.com/
|-- google/
| `-- go-github/
|-- motemen/
| `-- ghq/
`-- urfave/
`-- cli/
[ghq]
root = ~/.ghq
root = ~/go/src
$ git config --global --get-all ghq.root 127 ↵
~/.ghq
~/go/src
これで ghq list
などのコマンドで go get
したリポジトリも表示されるようになる。
ghq get
したときはプライマリの ~/.ghq
に配置される。
fzf: 曖昧検索するやつ
https://github.com/junegunn/fzf
$ brew install fzf
$ ghq list | fzf
$ cd $(ghq list -p | fzf)
or
$ ghq look $(ghq list | fzf)
hub
$ brew install hub
$ hub browse
ghq look
は新しく fish が立ち上がるのでこっちのがいい