]> git.plutz.net Git - serve0/commitdiff
improved group detection by optimising for numbered files
authorPaul Hänsch <paul@plutz.net>
Mon, 9 Dec 2019 21:25:01 +0000 (22:25 +0100)
committerPaul Hänsch <paul@plutz.net>
Mon, 9 Dec 2019 21:25:01 +0000 (22:25 +0100)
list.sh

diff --git a/list.sh b/list.sh
index cdb99e006a588412c4866ed4d1eaa7682acf445b..b941aa7f246d32a3a9e5ff09c0ee509e9ebd2b30 100644 (file)
--- a/list.sh
+++ b/list.sh
@@ -93,7 +93,8 @@ groupmatch(){
   else
     long="$2" short="$1"
   fi
-  com="$(expr substr "$long" 1 $((${#long} * 3 / 4)))"
+  # com="$(expr substr "$long" 1 $((${#long} * 3 / 4)))"
+  com="$(expr substr "$long" 1 $((${#long} - 3)))"
   cut="${short#$com}"
   if [ ${#cut} -lt ${#short} ]; then
     return 0