From 711d416e49daa49cc8d70bf0251c7355d966a431 Mon Sep 17 00:00:00 2001 From: v4n <105587619+v4n00@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:17:20 +0300 Subject: [PATCH] fix: order command changing indexes wrong (#79) --- h2mm | 5 ++--- version | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/h2mm b/h2mm index b421da8..a23b3c4 100755 --- a/h2mm +++ b/h2mm @@ -1,7 +1,6 @@ #!/usr/bin/env bash - -VERSION="0.6.6" +VERSION="0.6.7" # --- Globals --- @@ -1299,7 +1298,7 @@ function mod_order { idxs=$(echo "$entries" | awk -F, -v pos="$DB_MOD_ID_POS" '{print $pos}' | tr ' ' '\n') # step 5.3 - reverse sort the idxs if we are in descending order - [[ $ascending_order == false ]] && idxs=$(echo "$idxs" | sort -r) + [[ $ascending_order == false ]] && idxs=$(echo "$idxs" | sort -rV) for idx in $idxs; do # if ascending order, subtract 1 from the index, otherwise add 1 diff --git a/version b/version index 05e8a45..2228cad 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.6.6 +0.6.7