Advertisement
Guest User

Untitled

a guest
May 1st, 2015
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # have we requested to open in "other" emacs?
  4. OTHER=0
  5. if [[ "$1" == "-o" ]]; then
  6.     shift
  7.     OTHER=1
  8. fi
  9.  
  10. # check to see if we're already inside emacs
  11. [[ "$INSIDE_EMACS" != "" ]] && OTHER=1
  12.  
  13. # open file, creating a new client as necessary
  14. if [[ $OTHER -gt 0 ]]; then
  15.     emacsclient -n "$@" > /dev/null &
  16. else
  17.     emacsclient -c -nw "$@"
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement