mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
handle spaces
This commit is contained in:
parent
f6bb301372
commit
2790914808
1 changed files with 10 additions and 9 deletions
19
bin/web
19
bin/web
|
@ -56,18 +56,18 @@ plumbunix()
|
||||||
# Other browsers here
|
# Other browsers here
|
||||||
# ...
|
# ...
|
||||||
*opera*)
|
*opera*)
|
||||||
$BROWSER -remote 'openURL('"$i"',new-page)'
|
$BROWSER -remote 'openURL('"$@"',new-page)'
|
||||||
;;
|
;;
|
||||||
*firebird*)
|
*firebird*)
|
||||||
$BROWSER -remote 'openURL('"$i"',new-window)'
|
$BROWSER -remote 'openURL('"$@"',new-window)'
|
||||||
;;
|
;;
|
||||||
*firefox*)
|
*firefox*)
|
||||||
$BROWSER -remote 'openURL('"$i"',new-tab)' ||
|
$BROWSER -remote 'openURL('"$@"',new-tab)' ||
|
||||||
$BROWSER "$i"
|
$BROWSER "$@"
|
||||||
;;
|
;;
|
||||||
*mozilla*)
|
*mozilla*)
|
||||||
$BROWSER -remote 'openURL('"$i"',new-tab)' ||
|
$BROWSER -remote 'openURL('"$@"',new-tab)' ||
|
||||||
$BROWSER "$i"
|
$BROWSER "$@"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -89,17 +89,18 @@ if [ $# = 0 ]
|
||||||
then
|
then
|
||||||
plumb1 about:blank
|
plumb1 about:blank
|
||||||
else
|
else
|
||||||
for i
|
for i in "$@"
|
||||||
do
|
do
|
||||||
if [ -f "$i" ]
|
if [ -f "$i" ]
|
||||||
then
|
then
|
||||||
p=`pwd`
|
p=`pwd | sed 's/ /%20/g'`
|
||||||
i=`echo $i | sed 's/ /%20/g'`
|
i=`echo $i | sed 's/ /%20/g'`
|
||||||
i=`cleanname -d $p $i`
|
i=`cleanname -d "$p" "$i"`
|
||||||
i=file://$i
|
i=file://$i
|
||||||
else
|
else
|
||||||
i=`echo $i | tr -d ' '`
|
i=`echo $i | tr -d ' '`
|
||||||
fi
|
fi
|
||||||
|
echo p "$i"
|
||||||
plumb1 $i
|
plumb1 $i
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue