dotfiles/bin/executable_em

12 lines
304 B
Bash

#!/usr/bin/env bash
PARENT_COMMAND=$(ps -o comm= $PPID)
TTY=""
export TTY
export TERM=xterm-24bit
if [ "${PARENT_COMMAND}" == "$(basename "$SHELL")" ] || [ "${PARENT_COMMAND}" == "tmux: server" ]; then
exec emacsclient -s comacs --create-frame --tty "$@"
else
exec emacsclient --create-frame "$@"
fi;