From c345b1dd02b9bb182fa1fbe256e1c2bf18159b2e Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sat, 10 Apr 2021 02:08:22 +0100 Subject: darwin/zsh: Add support for a custom Emacs.app --- dotfiles-darwin/zsh/profile | 5 ++++- dotfiles-darwin/zsh/rc | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'dotfiles-darwin') diff --git a/dotfiles-darwin/zsh/profile b/dotfiles-darwin/zsh/profile index b4c094f..30a5ef0 100644 --- a/dotfiles-darwin/zsh/profile +++ b/dotfiles-darwin/zsh/profile @@ -2,7 +2,10 @@ () { local dir - for dir in /usr/local/opt/{gnu-tar,grep}/libexec/gnubin; do + for dir ( + /usr/local/opt/{gnu-tar,grep}/libexec/gnubin + ~/Applications/Emacs.app/Contents/MacOS/bin + ); do [[ -d ${dir} ]] && path=(${dir} ${path}) done } diff --git a/dotfiles-darwin/zsh/rc b/dotfiles-darwin/zsh/rc index cf77a4f..0971457 100644 --- a/dotfiles-darwin/zsh/rc +++ b/dotfiles-darwin/zsh/rc @@ -5,3 +5,10 @@ alias ls='ls -G' alias lsh='du -a | sort -h' alias pip=pip3 alias python=python3 + +() { + local emacs=~/Applications/Emacs.app/Contents/MacOS/Emacs + if ! which emacs >/dev/null && [[ -x ${emacs} ]]; then + alias emacs=${emacs} + fi +} -- cgit v1.2.3-70-g09d2