aboutsummaryrefslogtreecommitdiff
path: root/modules/base/fish/functions/e.fish
blob: cb3f2d6aaf4734535c4df7b3a3fb95848c2945c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# Spawn an emacs daemon for a project directory
function e --description='Setup emacs server and open emacsclient'
    set session (basename (pwd))
    
    ps x | grep emacs | grep $session > /dev/null

    if test $status != 0
        emacs --daemon=$session
    end
    
    emacsclient -c -s $session --eval '(fzf)' ^ /dev/null > /dev/null &
end