Pārlūkot izejas kodu

Added script to edit other scripts

Samuel W. Flint 8 gadi atpakaļ
vecāks
revīzija
dc229672ca
1 mainītis faili ar 22 papildinājumiem un 0 dzēšanām
  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