Browse Source

Added script to edit other scripts

Samuel W. Flint 8 years ago
parent
commit
dc229672ca
1 changed files with 22 additions and 0 deletions
  1. 22 0
      edit-user-script

+ 22 - 0
edit-user-script

@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [ $# -lt 1 ] ; then
+    echo "edit-user-script name [type]"
+    exit
+fi
+
+NAME=$1
+shift
+TYPE=$1
+shift
+
+case $TYPE in
+    perl)
+        emacsclient --alternate-editor="" -n ~/bin/${NAME}.pl
+        ;;
+    python)
+        emacsclient --alternate-editor="" -n ~/bin/${NAME}.py
+        ;;
+    *)
+        emacsclient --alternate-editor="" -n ~/bin/${NAME}
+esac