feat(mkrep): add directory + git-repo scaffolding command

mkcd's create-and-cd behavior plus git init, remote linking, and
optional remote creation via a user-configured command template
($MKREP_REMOTE_CMD, {name}/{user} placeholders).
This commit is contained in:
2026-09-09 20:38:09 -04:00
parent b59318e957
commit b3082a3313
4 changed files with 507 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# Copyright (C) 2026 Rootiest
# SPDX-License-Identifier: AGPL-3.0-or-later
# SYNOPSIS
# _mkrep_verbose <silent> <verbose> <message>
#
# DESCRIPTION
# Prints <message> only when <verbose> is 1 and <silent> is 0. Used by
# mkrep for the extra step-by-step tracing -v/--verbose adds.
#
# ARGUMENTS
# silent 1 to suppress output, 0 to allow it
# verbose 1 to print, 0 to stay quiet
# message Text to print (echo -e, so escapes/colour codes render)
#
# EXIT STATUS
# 0 always
function _mkrep_verbose --argument-names silent verbose msg
test "$silent" = 1; and return 0
test "$verbose" = 1; or return 0
echo -e $msg
end