diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/macedit | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/macedit b/bin/macedit new file mode 100755 index 00000000..23a17a25 --- /dev/null +++ b/bin/macedit @@ -0,0 +1,17 @@ +#!/bin/bash + +PLAN9=${PLAN9:-/usr/local/plan9} +bin=$PLAN9/bin + +file=$1 + +# Blanks are problematic in filenames: just plumb +# the file's content. +if echo "$file" | grep -q " " +then + base=$(basename "$file" | sed 's/ /_/g') + attr="action=showdata filename=/BadName/$base" + cat $file | "$bin/plumb" -i -d edit -a "$attr" +else + "$bin/plumb" -d edit "$file" +fi |