filename expansion

Certain strings are treated as filenames in tf (%{TFHELP}; %{TFLIBDIR}; %{TFLIBRARY}; arguments to /load, fwrite(); etc.). Those strings undergo filename expansion as described below.

If file begins with '~', all characters after the '~' up to the first '/' or end of string are treated as a user name, and the '~' and user name are replaced with the name of the home directory of that user. If the user name is empty, %{HOME} is substituted.

For example, if bob's home directory is /users/bob, then the command "/load ~bob/macros.tf" will attempt to load the file /users/bob/macros.tf.

"~user" expansion is not supported on systems that do not have the getpwnam() function.


Back to index
Back to tf home page
Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys