about summary refs log blame commit diff stats
path: root/edit
blob: 57c665c999cbc12cdf9c031c7423b8d459178b55 (plain) (tree)
1
2
3
4
5
6
7
8
9
                  
                                                               


               
                                                                            


        





                                             

                           
                              
    
                              
  
#!/usr/bin/env zsh
# Helper to more conveniently open commonly-used SubX programs.

if [ $# -eq 0 ]
then
  echo "Usage: $0 <file root without apps/ subdirectory or .subx extension>"
  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 $TARGET
else
  $EDITOR              $TARGET
fi