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.
This commit is contained in:
GHPS authored and rupa committed 2019-09-12 19:28:03 -04:00
1 parent 9d5a3fe040
commit e77e938493
1 file changed
+1 -1
+1 -1
View File
@@ -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