I've been playing with es the last couple of days, and it (like rc) has the quirk/feature that it only runs its startup script (.esrc
) on login. The usual way to run code in each interactive session is to put that code in the %prompt
function.
Of course, there's no %prompt
function if es -l
has never been run.
So, the question: how do you set the login environment when you come in via gdm or similar, which only source .profile (or .xprofile, .xsession, etc.)? The best I've come up with is:
if [ -f "$HOME/.esrc" ]; then
eval "`es -l <<-x
sh <<<'export -p'
x`"
fi
Which seems... horrifying. Any better approaches?
es
is not your login shell. What about settingalias es='es -l'
in.bashrc
?es
is my login shell. Sorry if I didn't make that clear. But login shells aren't run in X sessions before terminals are launched, at least as far as I know.bash
, notes
. But when I open a new terminal window, it runsbash
as a login shell.