mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
- 16 cross-shell utilities converted to sh/bash chezmoi executables: ai c2p cp-appid extract_agents fab gdc gh-sonr-org-migrate ghg-clone ghn gho git-summary launch_omp_livediff_overlay lc-elir mdcp mdp pj (ghg-clone not named ghg: unrelated cargo binary owns that name) - cwd/history helpers stay per-shell: yy c cd clip-last + ghg/ghn/gho cd-wrappers in bash/functions/ and zsh/functions/, loaded by rc files - fish keeps only shell-state functions; converted ones now hit PATH - cp-appid ignore gating moved to .local/bin path - dot_agents/skills: 82 skills materialized from dotstate storage so dot_claude skill symlinks resolve on fresh bootstrap; dotstate profile/symlinks.json released .agents/skills .bashrc .zshrc
29 lines
931 B
Bash
Executable File
29 lines
931 B
Bash
Executable File
#!/bin/sh
|
|
# Create a new private repo (prad.codes via tea, or github.com via gh),
|
|
# clone it with ghq, and print the clone directory for the shell wrapper to cd.
|
|
repo=$1
|
|
if [ -z "$repo" ]; then
|
|
echo "usage: ghn <repo-name>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
host=$(gum choose "prad.codes" "github.com") || exit 1
|
|
|
|
if [ "$host" = prad.codes ]; then
|
|
owner=$(tea organizations list -o simple | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | gum choose) || exit 1
|
|
[ -n "$owner" ] || exit 1
|
|
|
|
tea repos create --name "$repo" --owner "$owner" --private >&2 || exit 1
|
|
|
|
ghq get "https://prad.codes/$owner/$repo" >&2 || exit 1
|
|
printf '%s\n' "$(ghq root)/prad.codes/$owner/$repo"
|
|
else
|
|
owner=$(gum choose "prdlk" "wltbs") || exit 1
|
|
[ -n "$owner" ] || exit 1
|
|
|
|
gh repo create "$owner/$repo" --private >&2 || exit 1
|
|
|
|
ghq get "github.com/$owner/$repo" >&2 || exit 1
|
|
printf '%s\n' "$(ghq root)/github.com/$owner/$repo"
|
|
fi
|