summary refs log tree commit diff stats
path: root/zsh
diff options
context:
space:
mode:
authorAlan Pearce2018-12-24 18:33:44 +0000
committerAlan Pearce2018-12-24 18:33:44 +0000
commit9c1d547462f007cba3ed71a3b4f5ad6efceb0e44 (patch)
tree0f58ae59eff5124f591c1b650947f123bc45535a /zsh
parentd9f6ea9c62a6b72d977c425777234ff07566939b (diff)
downloadnixfiles-9c1d547462f007cba3ed71a3b4f5ad6efceb0e44.tar.lz
nixfiles-9c1d547462f007cba3ed71a3b4f5ad6efceb0e44.tar.zst
nixfiles-9c1d547462f007cba3ed71a3b4f5ad6efceb0e44.zip
zsh: Don't set emacsclient as EDITOR unless present
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.config/zsh/.zshrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index 125afc2a..f466bb39 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -15,7 +15,10 @@ setopt inc_append_history_time
 
 WORDCHARS=${${WORDCHARS//[-.=]}//[\/]}
 
-export EDITOR=emacsclient
+if (( ${+commands[emacsclient]} ))
+then
+  export EDITOR=emacsclient
+fi
 alias ec=emacsclient
 alias open-project=projectile
 _emacs_function () {