Fix editor once and for all by using editor.sh file.

This commit is contained in:
Ivan Malison 2014-12-11 16:15:57 -08:00
parent 524e5b0658
commit 54ba76d88c
2 changed files with 4 additions and 3 deletions

2
dotfiles/lib/editor.sh Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env zsh
[ -z "$*" ] && emacs || emacs_open "$@"

View File

@ -77,7 +77,6 @@ function time_emacs {
}
# Make emacs the default editor.
export EDITOR="e() { zsh -c 'emacs_open '"'"$@"; return 0; }; e'
export EDITOR="$HOME/.lib/editor.sh"
export VISUAL="$EDITOR"
# This is ugly as sin but I can't figure out how else to do it.
export GIT_EDITOR="zsh -c 'emacs_open '"'"$@"; return 0'
export GIT_EDITOR="$EDITOR"