Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Populate tcsh environment variables via a script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Populate tcsh environment variables via a script
Authored by: kholburn on Apr 01, '04 05:11:19PM
You only need this script when you log in remotely. When you log in locally you don't need it. If I knew any ruby I could add a test for the whether the first environment variable was already defined and terminate.

maybe:

if #{ENV[currentKey]} !~ /^$/
 exit
end


Maybe someone who knows ruby could do better


[ Reply to This | # ]
Populate tcsh environment variables via a script
Authored by: ssantry on Apr 02, '04 11:17:59AM

I think running this script only for remote logins is a good idea, but it's the shell's responsibility to determine this, not the script's.

Putting the following in ~/Library/init/tcsh/rc.mine (or ~/.tcshrc) worked for me:


if ($?SSH_CLIENT) then
    eval `~/Applications/bin/parseEnvironmentPlist.rb`
endif

---
- Sean

[ Reply to This | # ]