From 0715b481e250eef3b283c2a8290ed71aa031dd1c Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Fri, 2 May 2025 18:55:13 -0400 Subject: [PATCH] AutoYADM commit: 2025-05-02 18:55:13 --- .config/fish/functions/newrepo.fish | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.config/fish/functions/newrepo.fish b/.config/fish/functions/newrepo.fish index 72653d83..99e75d98 100644 --- a/.config/fish/functions/newrepo.fish +++ b/.config/fish/functions/newrepo.fish @@ -1,7 +1,22 @@ -function newrepo +function newrepo --description 'Create new repos on multiple providers' argparse h/help p/private P/public s/srht g/github a/all d/description= -- $argv function help - echo Help menu + echo newrepo -- easily create sr.ht and github repos! + echo USAGE + echo \tnewrepo '[]' '[flags]' + echo FLAGS + echo \t-p/--private: set private + echo \t-P/--public: set public + echo \t-s/--srht: set srht provider + echo \t-g/--github: set github provider + echo \t-a/--all: set all providers + echo \t-d/--description '[]': set optional description + echo AUTHOR + echo \tDaniel Fichtinger '' + echo LICENSE + echo \tMIT + echo URL + echo \t'git.sr.ht/~ficd/newrepo.fish' end if set -lq _flag_h || test (count $argv) -eq 0 help @@ -38,6 +53,13 @@ function newrepo if set -lq _flag_d set add --description \"$_flag_d\" end - echo hut git create $name --visibility $visibility $add + hut git create $name --visibility $visibility $add + end + if set -lq _flag_g || set -lq _flag_a + set -l add + if set -lq _flag_d + set add --description \"$_flag_d\" + end + gh repo create $name --disable-wiki "--$visibility" $add end end