mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-08-08 22:54:42 +02:00
Add new plugin emacs, to take benefit of daemon capabilities of emacs >=23
This commit is contained in:
10
plugins/emacs/emacsclient.sh
Executable file
10
plugins/emacs/emacsclient.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Starts emacs daemon if not already started.
|
||||
|
||||
x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null`
|
||||
if [ -z "$x" ] ;then
|
||||
emacsclient --alternate-editor "" --create-frame $@
|
||||
else
|
||||
emacsclient --alternate-editor "" $@
|
||||
fi
|
Reference in New Issue
Block a user