Properly set EDITOR for zsh inline editing. GIT_EDITOR actually needs to

be different becaseu of the way that it works.
This commit is contained in:
Ivan Malison 2014-11-20 22:14:12 -08:00
parent ed0f2dd469
commit 9b44d35171
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,5 @@
source ~/.lib/shellrc/functions.sh
source ~/.lib/shellrc/emacs.sh
function add_to_front_of_path {
export PATH=$@:$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||")
}

View File

@ -48,7 +48,7 @@ function existing_emacs {
}
function emacs_make_frame_if_none_exists {
emacsclient -e '(make-frame-if-none-exists-and-focus)' --server-file=$1
emacsclient -e '(make-frame-if-none-exists-and-focus)' --server-file=$1 > /dev/null
focus_emacs
}
@ -71,5 +71,7 @@ function emacs_open {
}
# Make emacs the default editor.
export EDITOR="zsh -c 'source ~/.zshrc && emacs_open '"'"$@"'
export EDITOR='emacs_open'
export VISUAL="$EDITOR"
# This is ugly as sin but I can't figure out how else to do it.
export GIT_EDITOR="zsh -c 'source ~/.zshrc && emacs_open '"'"$@"'