Created
August 2, 2018 16:09
-
-
Save rrrnld/b43efb66fb314ec679034fca690d85ad to your computer and use it in GitHub Desktop.
emacsclient wrapper for fish shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a port of the emacs zsh script found on | |
# https://medium.com/@bobbypriambodo/blazingly-fast-spacemacs-with-persistent-server-92260f2118b7 | |
# basically it checks whether we have a running emacs server; if we don't, it starts one | |
function e | |
emacsclient -n -e "(if (> (length (frame-list)) 1) 't)" ^ /dev/null | grep --silent t | |
if test $status -eq 1 | |
# not running, -a '' starts a new server | |
emacsclient -a '' -nqc $argv > /dev/null ^ /dev/null | |
else | |
emacsclient -nq $argv > /dev/null ^ /dev/null | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment