www.delorie.com/gnu/docs/octave/kpathsea_55.html   search  
Buy GNU books!

Kpathsea: A library for path searching

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3.3 Tilde expansion

A leading `~' in a path element is replaced by the value of the environment variable HOME, or `.' if HOME is not set.

A leading `~user' in a path element is replaced by user's home directory from the system `passwd' database.

For example,
setenv TEXINPUTS ~/mymacros:

will prepend a directory `mymacros' in your home directory to the default path.

As a special case, if a home directory ends in `/', the trailing slash is dropped, to avoid inadvertently creating a `//' construct in the path. For example, if the home directory of the user `root' is `/', the path element `~root/mymacros' expands to just `/mymacros', not `//mymacros'.

Tilde expansion is implemented in the source file `kpathsea/tilde.c'.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003