Add shellrc to zshenv. Get rid of bad which alias. Make emacs_open
support waiting. Fix editor command.
This commit is contained in:
parent
2b6029548c
commit
ab8f081be2
@ -1 +1 @@
|
|||||||
Subproject commit 37df87cf386d3645b2a88ee40d2451d1063423ba
|
Subproject commit bdd1bd0e3bc2f989e268147e0569540028d2ba34
|
@ -32,3 +32,7 @@ add_to_back_of_path "/usr/local/sbin"
|
|||||||
|
|
||||||
# Load RVM into a shell session *as a function*
|
# Load RVM into a shell session *as a function*
|
||||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||||
|
|
||||||
|
function shellrc {
|
||||||
|
zsh -c "source ~/.zshrc && ""$@"
|
||||||
|
}
|
||||||
|
@ -7,7 +7,6 @@ alias prj='cd ~/Projects'
|
|||||||
alias t27='tox -e py27 -- '
|
alias t27='tox -e py27 -- '
|
||||||
alias tvenv='tox -e venv -- '
|
alias tvenv='tox -e venv -- '
|
||||||
alias reload_tmux='tmux source-file ~/.tmux.conf'
|
alias reload_tmux='tmux source-file ~/.tmux.conf'
|
||||||
alias which='type'
|
|
||||||
alias ssh='ssh -A '
|
alias ssh='ssh -A '
|
||||||
|
|
||||||
# enables the sudoing of aliases.
|
# enables the sudoing of aliases.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
alias e='emacs_open'
|
alias e='emacs_open -n '
|
||||||
alias emacs='_emacs -c -n '
|
alias emacs='_emacs -c -n '
|
||||||
is_osx && alias emacs='cocoa_emacs'
|
is_osx && alias emacs='cocoa_emacs'
|
||||||
alias terminal_emacs='_emacs -t'
|
alias terminal_emacs='_emacs -t'
|
||||||
@ -40,7 +40,7 @@ function _current_dot_directory {
|
|||||||
function existing_emacs {
|
function existing_emacs {
|
||||||
# Return any existing emacs server file or the one that should
|
# Return any existing emacs server file or the one that should
|
||||||
# be created if it doesn't exist.
|
# be created if it doesn't exist.
|
||||||
local server_file="$(\ls ~/.emacs.d/server | head -n1)"
|
local server_file="$(emacs_get_running_instances | head -n1)"
|
||||||
[ -z "$server_file" ] && server_file="$(_emacs_server_file)"
|
[ -z "$server_file" ] && server_file="$(_emacs_server_file)"
|
||||||
echo $server_file
|
echo $server_file
|
||||||
}
|
}
|
||||||
@ -64,11 +64,10 @@ function emacs_open {
|
|||||||
fi
|
fi
|
||||||
local server_file="$(emacs_get_running_instances | head -n1)"
|
local server_file="$(emacs_get_running_instances | head -n1)"
|
||||||
emacs_make_frame_if_none_exists $server_file
|
emacs_make_frame_if_none_exists $server_file
|
||||||
[ ! -z "$@" ] && emacsclient "$@" -n --server-file="$server_file"
|
[ ! -z "$@" ] && emacsclient "$@" --server-file="$server_file"
|
||||||
focus_emacs
|
focus_emacs
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make emacs the default editor.
|
# Make emacs the default editor.
|
||||||
export EDITOR="$(which emacsclient) -n -s "
|
export EDITOR="zsh -c 'source ~/.zshrc && emacs_open '"'"$@"'
|
||||||
export ALTERNATE_EDITOR=""
|
|
||||||
export VISUAL="$EDITOR"
|
export VISUAL="$EDITOR"
|
||||||
|
Loading…
Reference in New Issue
Block a user