Files
fish-config/functions/_mkrep_verbose.fish
T
rootiest b3082a3313 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).
2026-09-09 20:38:09 -04:00

23 lines
649 B
Fish

# 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