mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
config(fish): add fish completions for cli tools
This commit is contained in:
1 parent
b1fb6ee6fb
commit
7db95c2076
48 files changed
+2241
No files matched your search
@@ -0,0 +1,29 @@
|
||||
function ghn -a repo
|
||||
if test -z "$repo"
|
||||
echo "usage: ghn <repo-name>" >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l host (gum choose "prad.codes" "github.com")
|
||||
or return 1
|
||||
|
||||
if test "$host" = prad.codes
|
||||
set -l owner (tea organizations list -o simple | string trim | gum choose)
|
||||
or return 1
|
||||
|
||||
tea repos create --name $repo --owner $owner --private
|
||||
or return 1
|
||||
|
||||
ghq get https://prad.codes/$owner/$repo
|
||||
and cd (ghq root)/prad.codes/$owner/$repo
|
||||
else
|
||||
set -l owner (gum choose "prdlk" "wltbs")
|
||||
or return 1
|
||||
|
||||
gh repo create $owner/$repo --private
|
||||
or return 1
|
||||
|
||||
ghq get github.com/$owner/$repo
|
||||
and cd (ghq root)/github.com/$owner/$repo
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user