diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2021-04-10 02:08:22 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2021-04-10 02:08:22 +0100 |
| commit | c345b1dd02b9bb182fa1fbe256e1c2bf18159b2e (patch) | |
| tree | e924a1792994004251c5e289d6b571198899c1cb /dotfiles-darwin/zsh | |
| parent | 6abd08d4ef4ef14ca74210431ab2ddb5de488c57 (diff) | |
darwin/zsh: Add support for a custom Emacs.app
Diffstat (limited to 'dotfiles-darwin/zsh')
| -rw-r--r-- | dotfiles-darwin/zsh/profile | 5 | ||||
| -rw-r--r-- | dotfiles-darwin/zsh/rc | 7 |
2 files changed, 11 insertions, 1 deletions
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 +} |
