edit-user-script 369 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. if [ $# -lt 1 ] ; then
  3. echo "edit-user-script name [type]"
  4. exit
  5. fi
  6. NAME=$1
  7. shift
  8. TYPE=$1
  9. shift
  10. case $TYPE in
  11. perl)
  12. emacsclient --alternate-editor="" -n ~/bin/${NAME}.pl
  13. ;;
  14. python)
  15. emacsclient --alternate-editor="" -n ~/bin/${NAME}.py
  16. ;;
  17. *)
  18. emacsclient --alternate-editor="" -n ~/bin/${NAME}
  19. esac