diff --git a/z.sh b/z.sh index e7120eb..f9ec16a 100644 --- a/z.sh +++ b/z.sh @@ -147,15 +147,15 @@ _z() { function output(matches, best_match, common) { # list or return the desired directory if( list ) { + if( common ) { + printf "%-10s %s\n", "common:", common > "/dev/stderr" + } cmd = "sort -n >&2" for( x in matches ) { if( matches[x] ) { printf "%-10s %s\n", matches[x], x | cmd } } - if( common ) { - printf "%-10s %s\n", "common:", common > "/dev/stderr" - } } else { if( common ) best_match = common print best_match