thandle spaces - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 279091480876733721672e457bc9233a3539358b
(DIR) parent f6bb301372d996200aafe71726d36b36a69e7724
(HTM) Author: rsc <devnull@localhost>
Date: Sun, 25 Jun 2006 23:49:10 +0000
handle spaces
Diffstat:
M bin/web | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
---
(DIR) diff --git a/bin/web b/bin/web
t@@ -56,18 +56,18 @@ plumbunix()
# Other browsers here
# ...
*opera*)
- $BROWSER -remote 'openURL('"$i"',new-page)'
+ $BROWSER -remote 'openURL('"$@"',new-page)'
;;
*firebird*)
- $BROWSER -remote 'openURL('"$i"',new-window)'
+ $BROWSER -remote 'openURL('"$@"',new-window)'
;;
*firefox*)
- $BROWSER -remote 'openURL('"$i"',new-tab)' ||
- $BROWSER "$i"
+ $BROWSER -remote 'openURL('"$@"',new-tab)' ||
+ $BROWSER "$@"
;;
*mozilla*)
- $BROWSER -remote 'openURL('"$i"',new-tab)' ||
- $BROWSER "$i"
+ $BROWSER -remote 'openURL('"$@"',new-tab)' ||
+ $BROWSER "$@"
;;
esac
}
t@@ -89,17 +89,18 @@ if [ $# = 0 ]
then
plumb1 about:blank
else
- for i
+ for i in "$@"
do
if [ -f "$i" ]
then
- p=`pwd`
+ p=`pwd | sed 's/ /%20/g'`
i=`echo $i | sed 's/ /%20/g'`
- i=`cleanname -d $p $i`
+ i=`cleanname -d "$p" "$i"`
i=file://$i
else
i=`echo $i | tr -d ' '`
fi
+ echo p "$i"
plumb1 $i
done
fi