[Remind-Fans] env variables
Michael Dunn
misha.dunn at gmail.com
Tue Aug 15 09:06:11 EDT 2006
I had the same problem (differently named home directories on
different machines, one .reminders file kept in cvs), and I don't see
that anybody has offered an answer to this yet.
* shell extensions like "~" don't work
* environment variable like $HOME don't work.
* paths to include files must be either absolute or be a simple
filename under $HOME
My old solution was to keep the include files in my cvs and to
softlink them from the top level of the home directory, e.g.
ln -s checkout/reminders/reminders.training .reminders.training
then put
INCLUDE .reminders.training
inside the .reminders file
This meant I had to make the soft link on every computer I keep an
account on, which was annoying but not too onerous.
What I wanted to do was use the getenv() function to get my home directory name.
However, while writing this email I discovered what seems to be a
solution. The filedir() "returns a pathname guaranteed to be correct
for use in an include command as follows: INCLUDE [filedir()]/stuff"
So my ~/.reminders file now has:
INCLUDE [filedir()]/checkout/reminders/reminders.training
I tried replacing [filedir()] with [getenv("HOME")] but had no luck:
the getenv() function returned "". Any ideas why? It'd be nicer to use
path relative to the home directory rather than relative to the parent
file of the include because then I wouldn't have to worry about
nesting includes at different places in the file hierarchy.
Cheers, Michael
More information about the Remind-fans
mailing list