```fish
for f in docs/**.d2
set -l dir (dirname $f)
set -l name (basename $f .d2)
if [ $name = "in" ]
set name out
end
if [ $name = "input" ]
set name output
end
go run main.go $f $dir/$name.txt
end
```
|
||
|---|---|---|
| .. | ||
| input.d2 | ||
| output.png | ||
| output.txt | ||