shithub: werc

Download patch

ref: f50734a6f5ebd1c9f08e09d417d9cd4737187661
parent: e45824d3da7d610051dbf6203eb12b0cf1507ecb
author: sl <uriel@engel.se.cat-v.org>
date: Sat Dec 13 11:16:10 EST 2008

Fix: don't completely delete 'sort helper' delimiter, revert it back to a '/', and coalesce any extra '/' for tidiness

--- a/bin/werc.rc
+++ b/bin/werc.rc
@@ -79,7 +79,7 @@
     # the /./->/|/ are added so we can sort -t| and order only the file name
     # NOTE: this breaks if any path element in blogDirs contain '/./' or '|'
     if (! ~ $#* 0)
-        ls $*^'/./' | sed -n 's,/\./,/|/,; /\/[0-9]+.*\.md$/p' | sort -r '-t|' +1 | sed 's,/\|/,,'
+        ls $*^'/./' | sed -n 's,/\./,/|/,; /\/[0-9]+.*\.md$/p' | sort -r '-t|' +1 | sed 's,/+\|/+,/,'
 }
 
 fn gen_blog_post_title {