oh-my-fish/plugins/emacs/functions/__launch_emacs.fish

10 lines
262 B
Fish
Raw Normal View History

function __launch_emacs
set -l x (emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null)
if test -z "$x" -o "$x" = nil
emacsclient $argv --alternate-editor '' --create-frame
else
emacsclient $argv --alternate-editor ''
end
end