dotfiles/bin/executable_em

10 lines
210 B
Bash

#!/usr/bin/env bash
PARENT_COMMAND=$(ps -o comm= $PPID)
TTY=""
if [ "${PARENT_COMMAND}" == $(basename $SHELL) ]; then
exec emacsclient --create-frame --tty "$@"
else
exec emacsclient --create-frame "$@"
fi;