mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-27 08:10:08 +00:00
Fixed bug that caused emacs terminal args
This commit is contained in:
parent
3668ec2a82
commit
609e42aef8
1 changed files with 10 additions and 1 deletions
|
@ -24,7 +24,6 @@ export EMACS_PLUGIN_LAUNCHER="${0:A:h}/emacsclient.sh"
|
||||||
# set EDITOR if not already defined.
|
# set EDITOR if not already defined.
|
||||||
export EDITOR="${EDITOR:-${EMACS_PLUGIN_LAUNCHER}}"
|
export EDITOR="${EDITOR:-${EMACS_PLUGIN_LAUNCHER}}"
|
||||||
|
|
||||||
alias emacs="$EMACS_PLUGIN_LAUNCHER --no-wait"
|
|
||||||
alias e=emacs
|
alias e=emacs
|
||||||
# open terminal emacsclient
|
# open terminal emacsclient
|
||||||
alias te="$EMACS_PLUGIN_LAUNCHER -nw"
|
alias te="$EMACS_PLUGIN_LAUNCHER -nw"
|
||||||
|
@ -66,3 +65,13 @@ function ecd {
|
||||||
file="$(efile)" || return $?
|
file="$(efile)" || return $?
|
||||||
echo "${file:h}"
|
echo "${file:h}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Opens emacs with --no-wait argument
|
||||||
|
function emacs {
|
||||||
|
# Checks for emacs terminal arguments which are incompatible with --no-wait
|
||||||
|
if [[ $* =~ "-nw" || $* =~ "-t" || $* =~ "-tty" ]]; then
|
||||||
|
$EMACS_PLUGIN_LAUNCHER $@
|
||||||
|
else
|
||||||
|
$EMACS_PLUGIN_LAUNCHER --no-wait $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue