From: Christian Heller Date: Wed, 2 Apr 2025 14:05:50 +0000 (+0200) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%22https:/validator.w3.org/balance?a=commitdiff_plain;h=d808c8817cf8515b67e32a2655aaff4eb7c5cbb7;p=config Fix. --- diff --git a/testing/home/desktop/.local/bin/borgplom b/testing/home/desktop/.local/bin/borgplom index 1a8c4ff..37b72b0 100755 --- a/testing/home/desktop/.local/bin/borgplom +++ b/testing/home/desktop/.local/bin/borgplom @@ -147,7 +147,7 @@ cmd_orgpull() { check_args_beyond() { _N_MAX_ARGS="$1" _CMD="$2" - shift "${_N_MAX_ARGS}" + shift "$(calc '${_N_MAX_ARGS} + 2' | cut -f2)" if [ "$#" -gt 0 ]; then _MSG="unexpected arguments beyond command '${_CMD}': $@" error_exit "${_MSG}" @@ -157,16 +157,16 @@ check_args_beyond() { if [ "$#" -lt 1 ]; then error_exit_with_usage "missing command." elif [ "$1" = "${CMD_CLAIM}" ]; then - check_args_beyond 2 "$@" + check_args_beyond 1 "$@" cmnd_claim "$1" elif [ "$1" = "${CMD_HELP}" ]; then - check_args_beyond 1 "$@" + check_args_beyond 0 "$@" print_usage elif [ "$1" = "${CMD_KEYS}" ]; then - check_args_beyond 1 "$@" + check_args_beyond 0 "$@" cmd_keys elif [ "$1" = "${CMD_ORGPULL}" ]; then - check_args_beyond 1 "$@" + check_args_beyond 0 "$@" cmd_orgpull else error_exit_with_usage "unexpected command: ${1}"