Sample Header Ad - 728x90

How do you set up the environment for es?

9 votes
2 answers
535 views
I've been playing with [es](http://wryun.github.com/es-shell/) 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?
Asked by james.haggerty (211 rep)
Aug 22, 2012, 02:07 AM
Last activity: Dec 9, 2023, 10:43 PM