From e77e9384937bd43eb6ca8f1ba036924f4006df07 Mon Sep 17 00:00:00 2001 From: GHPS Date: Fri, 13 Sep 2019 01:28:03 +0200 Subject: [PATCH] Corrected sort order in tab completion (#270) The tab completion for z lists hits in wrong order, not by rank. Switching from "-n" to "-g" for sort (i.e. general numeric) is required for the float rank value. --- z.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/z.sh b/z.sh index c78f3cb..2b7f87a 100644 --- a/z.sh +++ b/z.sh @@ -148,7 +148,7 @@ _z() { function output(matches, best_match, common) { # list or return the desired directory if( list ) { - cmd = "sort -n >&2" + cmd = "sort -g >&2" for( x in matches ) { if( matches[x] ) { printf "%-10s %s\n", matches[x], x | cmd