aboutsummaryrefslogtreecommitdiff
path: root/mac/Plumb.app/Contents/MacOS/plumb
blob: 80918aa255ca98fc76ad498c05a376125079290f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
. ~/.bashrc
PLAN9=${PLAN9:-/usr/local/plan9}
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