Intransition wrote:
> Any advice on how a ruby script can set a config info that's per
> parent process.

Using an environment variable?

> In other words I want to be able to do something like:
> ...
> But if I close my terminal and/or open a new terminal then it will
> have it's own setting.

Have foo set an environment variable and then exec a new shell.  The
foo script later can print the variable if it exists.  Here is
something off the top of my head.  Untested.  It spawns a new shell
though and that may be too disruptive for your needs.

Bob


#!/bin/sh
if [ -n "$myuniquefoovar" ]; then
  echo "$myuniquefoovar" # or possibly printf
  exit 0
fi
if [ $# -ne 0 ]; then
  myuniquefoovar="$*"
  export myuniquefoovar
  exec $SHELL
fi
exit 0