diff --git a/zsh/aliases b/zsh/aliases index 2f82d873..146f7f66 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -20,14 +20,19 @@ LOGS=/var/log is-callable 'nvim' && alias vim=nvim alias v='vim' if is-callable 'emacs'; then - alias emacs='emacs -nw' - e() { # Emacs version of v - if pgrep Emacs 2>&1 >/dev/null; then - emacsclient -n $@ - else - /Applications/Emacs.app/Contents/MacOS/Emacs $@ & - fi - } + if [[ "$OSTYPE" == darwin* ]]; then + alias emacs='emacs -nw' + e() { # Emacs version of v + if pgrep Emacs 2>&1 >/dev/null; then + emacsclient -n $@ + else + /Applications/Emacs.app/Contents/MacOS/Emacs $@ & + fi + } + else + alias e='emacsclient -n' + fi + ediff() { e --eval "(ediff-files \"$1\" \"$2\")"; } fi