[hackers] diri: new tip (= 32)

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Wed, 31 Jan 2007 14:40:01 +0100

changeset: 32:a813cc455df5
tag: tip
user: arg_AT_suckless.org
date: Wed Jan 31 14:32:34 2007 +0100
files: show.rc
description:
bugfix

diff -r ecad904c0a40 edit.rc
--- a/edit.rc Wed Jan 31 14:22:38 2007 +0100
+++ b/edit.rc Wed Jan 31 14:00:02 2007 +0100
@@ -13,7 +13,7 @@ if(test -d $DIRIDIR/$PATH_INFO) {
         echo
         exit 0
 }
-titlex=`{basename $PATH_INFO | sed 's/^[0-9]+_//; s/_/ /g'}
+titlex=`{basename $PATH_INFO | sed 's/_/ /g'}
 TITLE=$TITLE^' - '^$"titlex
 cat <<END
 Content-Type: text/html
diff -r ecad904c0a40 remove.rc
--- a/remove.rc Wed Jan 31 14:22:38 2007 +0100
+++ b/remove.rc Wed Jan 31 14:00:02 2007 +0100
@@ -30,7 +30,7 @@ if(test $password) {
         echo
         exit 0
 }
-titlex=`{basename $PATH_INFO | sed 's/^[0-9]+_//; s/_/ /g'}
+titlex=`{basename $PATH_INFO | sed 's/_/ /g'}
 TITLE=$TITLE^' - '^$"titlex
 cat <<END
 Content-Type: text/html
diff -r ecad904c0a40 show.rc
--- a/show.rc Wed Jan 31 14:22:38 2007 +0100
+++ b/show.rc Wed Jan 31 14:00:02 2007 +0100
@@ -13,9 +13,7 @@ fn menu {
         for(file in $2/*) {
                 base=`{basename $file}
                 if(echo $base | grep '^[a-zA-Z0-9_]+$' > /dev/null) {
- bname=`{echo $base | sed ''s/^[0-9]+_//; s/_/ /g'}
- if(test -d $file)
- bname=$"bname^'/'
+ bname=`{echo $base | sed 's/_/ /g'}
                         if(test $sub && ~ $base $sub) {
                                 echo '<li>'^$"bname^''
                                 if(test -d $file)
@@ -51,7 +49,7 @@ ifs='/
 '
 paths=`{echo $PATH_INFO}
 ifs=$tmp
-titlex=`{basename $PATH_INFO | sed 's/^[0-9]+_//; s/_/ /g'}
+titlex=`{basename $PATH_INFO | sed 's/_/ /g'}
 TITLE=$TITLE^' - '^$"titlex
 cat <<END
 Content-Type: text/html
Received on Wed Jan 31 2007 - 14:40:01 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:54:48 UTC