Skip to content

Instantly share code, notes, and snippets.

@jadient
Created February 12, 2018 04:55
Show Gist options
  • Save jadient/f4260f02f456c18d4234450304ceff93 to your computer and use it in GitHub Desktop.
Save jadient/f4260f02f456c18d4234450304ceff93 to your computer and use it in GitHub Desktop.
.bashrc snippet
if [[ -n $EMACS ]]; then
# inside emacs
echo ".bashrc: inside emacs"
alias e='emacsclient -a "" -n "$@"'
elif [[ -n $SSH_TTY ]]; then
# ssh/remote, use terminal mode
alias e='emacsclient -a "" -t "$@"'
else
# local/gui
alias e='emacsclient -a "" -n "$@"'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment