From 224aa11c1854cf1742d30d2bd64a60ac78da3814 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 19 Dec 2025 23:11:20 -0800 Subject: exact match should always be chosen --- gbpm.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gbpm.sh') diff --git a/gbpm.sh b/gbpm.sh index 50ff7a2..4a6fdd6 100755 --- a/gbpm.sh +++ b/gbpm.sh @@ -122,6 +122,12 @@ cmd_set() { match="${dir}" + # exact match + if [[ "${dir##*/}" == "${1}" ]]; then + unset match_start + break + fi + # match from start of version is preferred. we assume the # version is at the beginning of the directory name or # immediately following a hyphen. this avoids unintuitive -- cgit v1.2.3-70-g09d2