Make dir listings a bit prettier by replacing [-_] with spaces. - swerc - ansel… | |
git clone git://git.suckless.org/swerc | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 4ac83e6f4a816bd9e63c1bc7f22f086dca4216a6 | |
parent d5e2a68ea7bd3f9cf9108f1580960da4e5fc2240 | |
Author: Uriel <[email protected]> | |
Date: Mon, 28 Jun 2010 09:06:45 +0000 | |
Make dir listings a bit prettier by replacing [-_] with spaces. | |
Diffstat: | |
M bin/corehandlers.rc | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/bin/corehandlers.rc b/bin/corehandlers.rc | |
@@ -75,9 +75,9 @@ fn dir_listing_handler { | |
d=`{basename -d $1} | |
if(~ $#d 0) | |
d='/' | |
- echo $d|sed 's,.*//,,g; s,/$,,; s,/, / ,g; s,.*,<h1 class="dir-list-head">… | |
+ echo $d|sed 's,.*//,,g; s,/$,,; s,/, / ,g; s/[\-_]/ /g; s,.*,<h1 class="di… | |
# Symlinks suck: '/.' forces ls to list the linked dir if $d is a symlink. | |
- ls -F $dir_listing_ls_opts $sitedir$d/. | sed $dirfilter$dirclean' s,.*/([… | |
+ ls -F $dir_listing_ls_opts $sitedir$d/. | sed $dirfilter$dirclean | awk '{… | |
echo '</ul>' | |
} | |