Browse Source

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

While at it, inline the only remaining call to _mdirs
master
Lucas 2 months ago
parent
commit
4a86e6f983
1 changed files with 3 additions and 8 deletions
  1. +3
    -8
      mblaze/m.sh

+ 3
- 8
mblaze/m.sh 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


Loading…
Cancel
Save