Created
November 24, 2016 16:39
-
-
Save hirofumi/46258c8f4155d4c885b8fd1e82df5447 to your computer and use it in GitHub Desktop.
ghq + peco + cd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function repo() { | |
local selected | |
selected=$(ghq list --full-path | grep "$1" | peco --query="$1" --select-1) | |
test -n "${selected}" && cd "${selected}" | |
} | |
function _repo() { | |
_values $(ghq list --unique) | |
} | |
compdef _repo repo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment