From cce28fc6f44228268abc1c0562304b6f904e7dcc Mon Sep 17 00:00:00 2001 From: Tim Mecking Date: Sun, 28 Jun 2026 19:59:03 +0200 Subject: [PATCH] Fixed parsing of "+N" parameter. The pattern "+[0-9][0-9]*" does not match a '+' character followed by a number. Instead it matches a '+' character followed by 2 digits and any number of any character. The correct pattern needs the shell option extglob to be activates and is "\++([0-9])". --- rmate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rmate b/rmate index ce696b2..3379d42 100755 --- a/rmate +++ b/rmate @@ -170,6 +170,7 @@ function canonicalize { echo "$result" } +shopt -s extglob while [[ "$1" != "" ]]; do case $1 in -) @@ -222,7 +223,7 @@ while [[ "$1" != "" ]]; do showusage exit 0 ;; - +[0-9][0-9]*) + \++([0-9])) selections+=(${1:1}) ;; *) @@ -237,6 +238,7 @@ while [[ "$1" != "" ]]; do shift done +shopt -u extglob if [[ "$host" = "auto" && "$SSH_CONNECTION" != "" ]]; then host=${SSH_CONNECTION%% *}