about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-05-28 10:07:59 -0700
committerKartik Agaram <vc@akkartik.com>2020-05-28 10:07:59 -0700
commitdce349f52c40a16c78ca68e300278605998d5d32 (patch)
treea32c193742c1e8b888dfd633c27674ef2e35effb
parentdd6e4bc789ae8f397a5999358965f80eea1708ce (diff)
downloadmu-dce349f52c40a16c78ca68e300278605998d5d32.tar.gz
6416
-rwxr-xr-xedit10
1 files changed, 8 insertions, 2 deletions
diff --git a/edit b/edit
index aa9ccff7..57c665c9 100755
--- a/edit
+++ b/edit
@@ -7,9 +7,15 @@ then
   exit 1
 fi
 
+TARGET=apps/$1.mu
+if [[ -e apps/$1.subx  &&  ! -e apps/$1.mu ]]
+then
+  TARGET=apps/$1.subx
+fi
+
 if [[ $EDITOR == *'vim'* ]]
 then
-  $EDITOR -S vimrc.vim apps/$1.subx
+  $EDITOR -S vimrc.vim $TARGET
 else
-  $EDITOR              apps/$1.subx
+  $EDITOR              $TARGET
 fi