c12e49ecbf
When we plumb a file, we open it in the current working directory if it exists. However, if it doesn't exist, we end up opening it relative to the editor's working directory. Expanding the path to works around this issue.
18 lines
170 B
Bash
Executable file
18 lines
170 B
Bash
Executable file
#!/bin/rc
|
|
|
|
rfork e
|
|
|
|
files=()
|
|
dest=()
|
|
|
|
if(~ $#* 0){
|
|
echo usage: B file ... >[1=2]
|
|
exit usage
|
|
}
|
|
|
|
wdir=`{pwd}
|
|
for(i){
|
|
if(! ~ $i /*)
|
|
i=$wdir/$i
|
|
plumb -s B -d edit $i
|
|
}
|