m: sorting Maildirs is useless as msort is called later on

While at it, inline the only remaining call to _mdirs
This commit is contained in:
Lucas 2020-03-29 17:47:20 +00:00
parent 78c51d09c7
commit 4a86e6f983

View File

@ -22,11 +22,6 @@ Usage:
exit 1
}
_mdirs()
{
mdirs "$@" | sort -t /
}
m_fetch_usage()
{
printf "Usage: %s f|fetch\n" "${0##*/}" >&2
@ -58,7 +53,7 @@ m_list()
{
pwd=$(pwd)
# cut(1) lists are 1-based, and +1 for leading slash
_mdirs "${@:-.}" | cut -c $((${#pwd} + 2))- | mlist -i
mdirs "${@:-.}" | sort -t / | cut -c $((${#pwd} + 2))- | mlist -i
}
m_read()
@ -67,7 +62,7 @@ m_read()
m_read_usage
fi
_mdirs "$@" | mlist -s | msort -d | mthread | mless
mdirs "$@" | mlist -s | msort -d | mthread | mless
}
m_scan()
@ -89,7 +84,7 @@ m_scan()
m_scan_usage
fi
_mdirs "$@" | mlist $mlist_flags | msort -d | mthread | mseq -S | mscan
mdirs "$@" | mlist $mlist_flags | msort -d | mthread | mseq -S | mscan
}
if [ $# -lt 1 ]; then