about summary refs log tree commit diff stats
path: root/edit
diff options
context:
space:
mode:
Diffstat (limited to 'edit')
-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