diff options
author | rsc <devnull@localhost> | 2006-06-25 23:49:10 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-06-25 23:49:10 +0000 |
commit | 279091480876733721672e457bc9233a3539358b (patch) | |
tree | 2ef997e92f3b51e6d2661cf737a0d7e2fd20302e | |
parent | f6bb301372d996200aafe71726d36b36a69e7724 (diff) | |
download | plan9port-279091480876733721672e457bc9233a3539358b.tar.gz plan9port-279091480876733721672e457bc9233a3539358b.tar.bz2 plan9port-279091480876733721672e457bc9233a3539358b.zip |
handle spaces
-rwxr-xr-x | bin/web | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -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 } @@ -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 |