zsh aliases: different emacs alias for linux

This commit is contained in:
Henrik Lissner 2016-10-06 13:39:50 +02:00
parent 332e03010a
commit 72249d6950

View file

@ -20,6 +20,7 @@ LOGS=/var/log
is-callable 'nvim' && alias vim=nvim is-callable 'nvim' && alias vim=nvim
alias v='vim' alias v='vim'
if is-callable 'emacs'; then if is-callable 'emacs'; then
if [[ "$OSTYPE" == darwin* ]]; then
alias emacs='emacs -nw' alias emacs='emacs -nw'
e() { # Emacs version of v e() { # Emacs version of v
if pgrep Emacs 2>&1 >/dev/null; then if pgrep Emacs 2>&1 >/dev/null; then
@ -28,6 +29,10 @@ if is-callable 'emacs'; then
/Applications/Emacs.app/Contents/MacOS/Emacs $@ & /Applications/Emacs.app/Contents/MacOS/Emacs $@ &
fi fi
} }
else
alias e='emacsclient -n'
fi
ediff() { e --eval "(ediff-files \"$1\" \"$2\")"; } ediff() { e --eval "(ediff-files \"$1\" \"$2\")"; }
fi fi