From: Michael Orlitzky Date: Thu, 25 Jun 2020 01:32:56 +0000 (-0400) Subject: aliases.sh: don't alias "emacs" if we're in an emacs shell. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=43e39a53389069e0c007d75470f96420e72279bc;p=bash.d.git aliases.sh: don't alias "emacs" if we're in an emacs shell. --- diff --git a/aliases.sh b/aliases.sh index 425eba8..76962bd 100644 --- a/aliases.sh +++ b/aliases.sh @@ -4,12 +4,15 @@ alias df='df --human-readable' alias du='du --human-readable --summarize --total *' -# We set EDITOR, VISUAL, and the "emacs" alias to the no-window -# version because it's so much faster than gtk emacs. In the rare -# cases (like within emacs's own multi-term environment) where -# a separate gtk window is required, /usr/bin/emacs can be used -# instead. -alias emacs='emacs --no-window-system' +if [ "${TERM#eterm}" = "${TERM}" ]; then + # We set EDITOR, VISUAL, and the "emacs" alias to the no-window + # version because it's so much faster than gtk emacs. (Note: the + # environment variables are currently set using "eselect" in + # Gentoo.) The exception for "eterm" that we've made here is to + # avoid launching emacs-nw within emacs-nw itself; in multi-term, + # for example, where $TERM is "eterm-color". + alias emacs='emacs --no-window-system' +fi alias ls='ls -l --color=auto --human-readable --time-style=long-iso' alias youtube-dl-mp3='youtube-dl --extract-audio --audio-format=mp3'