From ad71e8fa8e57eb67fc55b1e4cb09b67b9152baca Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Fri, 4 Apr 2025 16:04:08 +0200 Subject: [PATCH] Fix. --- testing/home/desktop/.local/bin/borgplom | 4 ++-- testing/home/desktop/.local/bin/vol | 2 +- testing/home/desktop/.plomlib.sh/print_usage | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/testing/home/desktop/.local/bin/borgplom b/testing/home/desktop/.local/bin/borgplom index c850818..141c8c2 100755 --- a/testing/home/desktop/.local/bin/borgplom +++ b/testing/home/desktop/.local/bin/borgplom @@ -8,7 +8,7 @@ cd $(dirname "$0") . lib/print_usage cd - > /dev/null -USAGE_DESCRIPTION='Wrapper around certain borgbackup usages.' +USAGE_DESCRIPTION='Wrapper around certain borgbackup usages.\n\nAvailable commands:' USAGE_LINES='COMMAND [ARGUMENT]...' PATH_BORG_CONF_SECURITY="${PATH_BORG_CONF}/security" @@ -121,7 +121,7 @@ CMDFNC_help() { } USAGE_ARGS_info='SERVER_NAME [ARCHIVE]' -USAGE_DESC_info="run 'borg info' against repo at \"$(location_from_servername SERVER_NAME)\"in server of SERVER_NAME, optionally only against ARCHIVE; if latter not provided, instead list most recent archives of repo" +USAGE_DESC_info="run 'borg info' against repo at \"$(location_from_servername SERVER_NAME)\", optionally only against ARCHIVE; if latter not provided, instead list most recent archives of repo" CMDFNC_info() { _check_args_n 1 2 "$@" _TARGET_REPO="$(location_from_servername ${1})" diff --git a/testing/home/desktop/.local/bin/vol b/testing/home/desktop/.local/bin/vol index cbb9ea7..e77a243 100755 --- a/testing/home/desktop/.local/bin/vol +++ b/testing/home/desktop/.local/bin/vol @@ -10,7 +10,7 @@ MAX_LOUDNESS=150 FLAG_HELP_SHORT='-h' FLAG_HELP_LONG='--help' -USAGE_DESCRIPTION='Set audio volume, or (if called without any arguments) toggle audio device muteness.' +USAGE_DESCRIPTION='Set audio volume, or (if called without any arguments) toggle audio device muteness.\n\nAvailable arguments:' USAGE_LINES='[COMMAND]\nLOUDNESS' USAGE_INDICES='LOUDNESS _help' USAGE_DESC_LOUDNESS='audio volume to set (as percentage, must be integer)' diff --git a/testing/home/desktop/.plomlib.sh/print_usage b/testing/home/desktop/.plomlib.sh/print_usage index 1c0958d..15448ea 100644 --- a/testing/home/desktop/.plomlib.sh/print_usage +++ b/testing/home/desktop/.plomlib.sh/print_usage @@ -1,12 +1,10 @@ -USAGE_BIN_NAME="$(basename $0)" - print_usage() { + _BIN_NAME="$(basename $0)" echo 'Usage:' echo "${USAGE_LINES}" | while read _LINE; do - echo " ${USAGE_BIN_NAME} ${_LINE}" + echo " ${_BIN_NAME} ${_LINE}" done echo "\n${USAGE_DESCRIPTION}\n" - echo "Available arguments:\n" _var_of() { eval printf '"%s"' '"${'"${1}${2}"'}"'; } _build_index() { _ARGS="$(_var_of 'USAGE_ARGS_' ${_IDX})" -- 2.30.2