mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 16:10:14 +00:00
use fish for repos downloading
This commit is contained in:
@ -20,7 +20,18 @@ selected=$(gh repo list "$organization" \
|
||||
--header-lines=1 \
|
||||
--layout=reverse \
|
||||
--bind "ctrl-o:execute:gh repo view -w ${organization}/{1}" \
|
||||
--bind "shift-up:preview-half-page-up" \
|
||||
--bind "shift-down:preview-half-page-down" \
|
||||
--preview "GH_FORCE_TTY=49% gh repo view ${organization}/{1} | glow -" \
|
||||
--preview-window up
|
||||
)
|
||||
[ -n "${selected}" ] && gh repo clone "${organization}/$(echo "${selected}" | awk '{print $1}')"
|
||||
[ -n "${selected}" ] && {
|
||||
directory="$HOME/dev/work"
|
||||
if [ $organization = "nmasur" ]; then directory="$HOME/dev/personal"; fi
|
||||
repo=$(echo "${selected}" | awk '{print $1}')
|
||||
repo_full="${organization}/${repo}"
|
||||
if [ ! -d "${directory}/${repo}" ]; then
|
||||
gh repo clone "$repo_full" "${directory}/${repo}"
|
||||
fi
|
||||
echo "${directory}/${repo}"
|
||||
}
|
Reference in New Issue
Block a user