mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-13 17:52:57 +08:00
![Kelvin Smith](/assets/img/avatar_default.png)
Updated in response to comments from @bucaran Port of oh-my-zsh emacs plugin. Includes a function to kill emacs from command line once a daemon has started. More information included in plugins/emacs/README.md. See reference plugin here: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/emacs
10 lines
281 B
Fish
10 lines
281 B
Fish
function __launch_emacs
|
|
set -l x (emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null)
|
|
|
|
if begin; test -z "$x"; or test $x = nil; end
|
|
emacsclient $argv --alternate-editor '' --create-frame
|
|
else
|
|
or emacsclient $argv --alternate-editor ''
|
|
end
|
|
end
|