tmacedit - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
tmacedit (354B)
---
1 #!/bin/bash
2
3 PLAN9=${PLAN9:-/usr/local/plan9}
4 bin=$PLAN9/bin
5
6 file=$1
7
8 # Blanks are problematic in filenames: just plumb
9 # the file's content.
10 if echo "$file" | grep -q " "
11 then
12 base=$(basename "$file" | sed 's/ /_/g')
13 attr="action=showdata filename=/BadName/$base"
14 cat $file | "$bin/plumb" -i -d edit -a "$attr"
15 else
16 "$bin/plumb" -d edit "$file"
17 fi