Skip to content

Instantly share code, notes, and snippets.

@nikuuchi
Created January 23, 2012 04:31
Show Gist options
  • Select an option

  • Save nikuuchi/1660592 to your computer and use it in GitHub Desktop.

Select an option

Save nikuuchi/1660592 to your computer and use it in GitHub Desktop.
Emacsのデーモンを立ち上げる時に、既にデーモンが立ち上がっているときに早めに検出して無駄に立ち上げる時間を省く。
#!/usr/bin/env bash
num=`ps aux|grep emacs\ -nw\ --daemon|wc -l`
if [ $num = 1 ]
then
TERM=xterm-256color emacs -nw --daemon
else
echo 'Emacs is already running.'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment