Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kodaka/3a97f318b1e41717a7fd5e4850f80233 to your computer and use it in GitHub Desktop.
Save kodaka/3a97f318b1e41717a7fd5e4850f80233 to your computer and use it in GitHub Desktop.
title date tags
Driving Git Repository with ghq and peco
2019-07-09 23:00:00 +0900
git
github
ghq
peco
homebrew
bash

Drive your git repository with incremental filtering!

You will install ghq and peco by Homebrew.

brew install ghq
brew install peco

Set function like this:

# .bashrc or something
function peco-g() {
    local repo=$(ghq list --full-path | peco)
    if [[ $repo ]]; then
        cd $repo
    fi
}

And you can now:

ghq get https://github.com/kodaka/jekyll_tiny_tag
peco-g

Happy driving!

By the way, I like to:

# .bashrc or something
function cd() {
    builtin cd "$@" && pwd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment