aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2025-12-19 23:11:20 -0800
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2025-12-19 23:11:20 -0800
commit224aa11c1854cf1742d30d2bd64a60ac78da3814 (patch)
tree977b75692fedbcae9a74209139820f9328f93b89
parentab5766625df66a33101d96fe8b717a19707e6598 (diff)
downloadgbpm-224aa11c1854cf1742d30d2bd64a60ac78da3814.tar.gz
gbpm-224aa11c1854cf1742d30d2bd64a60ac78da3814.tar.xz
exact match should always be chosen
-rwxr-xr-xgbpm.sh6
1 files changed, 6 insertions, 0 deletions
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