about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-09-20 21:50:08 -0700
committerKartik Agaram <vc@akkartik.com>2018-09-20 21:50:08 -0700
commitaf21f7d1cde23ae2fc1c4c30d25c07b159d27f5e (patch)
tree563162de3eb06c023c8f7723f614cbff6262aad5 /subx
parent3fe714d3d463d2040f2089214e56d7825daf4c06 (diff)
downloadmu-af21f7d1cde23ae2fc1c4c30d25c07b159d27f5e.tar.gz
4563
Diffstat (limited to 'subx')
-rwxr-xr-xsubx/edit15
1 files changed, 15 insertions, 0 deletions
diff --git a/subx/edit b/subx/edit
new file mode 100755
index 00000000..03a2c284
--- /dev/null
+++ b/subx/edit
@@ -0,0 +1,15 @@
+#!/usr/bin/env zsh
+# Open a specific example.
+
+if [ $# -eq 0 ]
+then
+  echo "edit <file>"
+  exit 1
+fi
+
+if [[ $1 == 'ex'* ]]
+then
+  eval $EDITOR examples/$1.subx
+else
+  eval $EDITOR apps/$1.subx
+fi