swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit dbf9b9a3154b85245429769de5904407369746b9
parent f960d8376a15df4a369745ae97a18d987aceb589
Author: uriel@engel.se.cat-v.org <unknown>
Date:   Tue, 16 Dec 2008 03:45:44 +0100

Fix and cleanup dir listing regexp.
Diffstat:
Mbin/werc.rc | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bin/werc.rc b/bin/werc.rc @@ -125,8 +125,7 @@ fn dir_listing_handler { d = `{basename -d $1} dt = `{echo $d|sed -e 's,.*//,,g' -e 's,/$,,' -e 's,/, / ,g'} echo '<h1 class="dir-list-head">'^$"dt^'</h1> <ul class="dir-list">' - # XXX I'm not sure what the [^$] does there - ls -F $d | sed -e 's/\*$//; '^$dirfilter' s,^'$sitedir'/.*/([^$].*),<li><a href="\1">\1</a></li>,' + ls -F $d | sed -e 's/\*$//; '^$dirfilter' s,^'$sitedir'/.*/([^/]+/?)$,<li><a href="\1">\1</a></li>,' echo '</ul>' }