mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
Plumb.app: handle spaces in file names (Rob Pike)
R=rsc http://codereview.appspot.com/4113042
This commit is contained in:
parent
cbcec5adb9
commit
ff262e1029
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,12 @@
|
|||
#!/bin/bash
|
||||
. ~/.bashrc
|
||||
PLAN9=${PLAN9:-/usr/local/plan9}
|
||||
$PLAN9/bin/plumb $($PLAN9/bin/macargv)
|
||||
filename="$($PLAN9/bin/macargv)"
|
||||
# Blank are problematic in the file name. Make them go away but keep the content.
|
||||
if echo "$filename" | grep -q " "
|
||||
then
|
||||
base=$(basename "$filename" | sed 's/ /_/g')
|
||||
cat "$filename" | plumb -i -d edit -a "action=showdata filename=/BadName/$base"
|
||||
else
|
||||
$PLAN9/bin/plumb -d edit "$filename"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue