Skip to content

Commit e77e938

Browse files
GHPSrupa
authored andcommitted
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.
1 parent 9d5a3fe commit e77e938

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

z.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ _z() {
148148
function output(matches, best_match, common) {
149149
# list or return the desired directory
150150
if( list ) {
151-
cmd = "sort -n >&2"
151+
cmd = "sort -g >&2"
152152
for( x in matches ) {
153153
if( matches[x] ) {
154154
printf "%-10s %s\n", matches[x], x | cmd

0 commit comments

Comments
 (0)