ref: 53d8c4ea8998ef78e62ce775377b81a80a6a2250
parent: 90d4be6738a480e784f8e51caca2f287bbccc6bf
author: uriel <uriel@engel.se.cat-v.org>
date: Tue Jan 20 01:55:17 EST 2009
Allow to set optional dir listing sorting (ls) options with the config var: dir_listing_ls_opts
--- a/bin/werc.rc
+++ b/bin/werc.rc
@@ -81,7 +81,7 @@
d=`{basename -d $1}
echo $d|sed 's,.*//,,g; s,/$,,; s,/, / ,g; s,.*,<h1 class="dir-list-head">&</h1> <ul class="dir-list">,'
# Symlinks suck: '/.' forces ls to list the linked dir if $d is a symlink.
- ls -F $d/. | sed $dirfilter$dirclean' s,.*/([^/]+/?)$,<li><a href="\1">\1</a></li>,'
+ ls -F $dir_listing_ls_opts $d/. | sed $dirfilter$dirclean' s,.*/([^/]+/?)$,<li><a href="\1">\1</a></li>,'
echo '</ul>'
}