~seirdy/dotfiles

ref: 9c536916553fe3e5cbdd77d2f099b04a9519e424 dotfiles/Executables/shell-scripts/bin/cdg -rwxr-xr-x 233 bytes
9c536916 — Rohan Kumar Replace some aliases with scripts/functions 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env dash
# cd to a git repo managed by ghq
if [ -z "$1" ]; then
	cdto=$(ghq list | fzf)
else
	cdto=$(ghq list | fzf -q "$@")
fi
# shellcheck disable=SC2154
[ "$cdto" = '' ] || cd "$GHQ_ROOT/$cdto" || return 1

# vi:ft=sh