From: Christian Heller Date: Fri, 4 Apr 2025 10:30:37 +0000 (+0200) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/static/test?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=config Fix. --- diff --git a/testing/home/desktop/.local/bin/borgplom b/testing/home/desktop/.local/bin/borgplom index 65350f1..8305282 100755 --- a/testing/home/desktop/.local/bin/borgplom +++ b/testing/home/desktop/.local/bin/borgplom @@ -23,7 +23,11 @@ _print_usage() { _var_of() { eval printf '"%s"' '"${'"${1}${2}"'}"'; } _build_index() { - _INDEX=" ${_CMD}$(_var_of 'HELP_ARGS_' ${_CMD})" + _ARGS="$(_var_of 'HELP_ARGS_' ${_CMD})" + if [ ! -z "${_ARGS}" ]; then + _ARGS=" ${_ARGS}" + fi + _INDEX=" ${_CMD}${_ARGS}" _LEN_INDEX=$(echo -n "${_INDEX}" | wc -c) } _MAX_LEN_INDEX=0 @@ -66,7 +70,7 @@ _check_args_n() { _id_from_file() { head -1 "$1" | cut -d' ' -f2; } -HELP_ARGS_backup_keys=' PATH' +HELP_ARGS_backup_keys='PATH' HELP_DESC_backup_keys="copy known keys to PATH/, with their repos' server names as filenames" CMDFNC_backup_keys() { _check_args_n 1 "$@" @@ -91,7 +95,7 @@ CMDFNC_backup_keys() { cd - > /dev/null } -HELP_ARGS_claim=' PATH' +HELP_ARGS_claim='PATH' HELP_DESC_claim="register file of PATH as key to repo at \"$(servername_to_location SERVERNAME)\", with SERVERNAME the filename portion of PATH" CMDFNC_claim() { _check_args_n 1 "$@"