GNU Info

Info Node: (kpathsea.info)Tilde expansion

(kpathsea.info)Tilde expansion


Next: Brace expansion Prev: Variable expansion Up: Path expansion
Enter node , (file) or (file)node

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'.


automatically generated by info2www version 1.2.2.9