-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorporate jump navigation #294
Comments
the
Then there is a bash shell wrapper that gets installed and simply forwards the command and then |
Meanwhile I came up with this shell function: function j() {
local ROOT="$HOME/ghq"
if [ $# -eq 0 ]; then
_j_dir="$ROOT/$(ghq list | fzf)"
else
_j_dir=$(command h --resolve "$ROOT" "$@")
fi
_j_ret=$?
[ "$_j_dir" != "$PWD" ] && cd "$_j_dir"
return $_j_ret
} |
If you are already using fzf, perhaps something like |
Thanks, the disadvantage is that it populates the fzf list with my EDIT: I really like ease of But I think you didn't actually intent to suggest avoiding |
This is written using peco and the Fish shell, but should illustrate how I fixed the prefix/no prefix issue: function ws
set -l short_dest (ghq list 2>/dev/null | peco --on-cancel=error --select-1 --query "$argv"); or return 1
set -l full_dest (ghq list --full-path --exact "$short_dest" 2>/dev/null)
cd "$full_dest"
end So if I type Or, if I run |
When cloning manually from Including h into ghq can help regain similar speeds in finding that project's directory. |
In case you also use export FZF_ALT_C_COMMAND="ghq list --full-path" With that set, Alt-C displays a list of every Git repository managed by ghq, which can be filtered with fzf. |
https://github.com/zimbatm/h is a very similar tool.
It allows to jump to
~/ghq/github.com/x-motemen/ghq
by just typingh ghq
h blaggacao/ghq
for~/ghq/github.com/blaggacao/ghq
.h x-motemen/ghq
- somewhat similar toghq
- it clones from github, if a local copy doesn't exist.h gitlab.com/x-motemen/ghq
to achieve the same.The author of h suggests that it would be worth the effort to think about incorporatin h's functionality into
ghq
since ghq is the more versatile tool.@x-motemen what are your thoughts?
The text was updated successfully, but these errors were encountered: