diff options
| author | Eli Zaretskii | 2001-02-23 11:23:10 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-02-23 11:23:10 +0000 |
| commit | 3d85335156de38fb62d56131b65052d1aba8a2da (patch) | |
| tree | 803af88f362738c7268d89d8c2b141f3f0ca157a | |
| parent | ae529c6424da1d6ca863d6e1bd2d91f97e39a18a (diff) | |
| download | emacs-3d85335156de38fb62d56131b65052d1aba8a2da.tar.gz emacs-3d85335156de38fb62d56131b65052d1aba8a2da.zip | |
(File Names): Add documentation of the tilde expansion in file names.
From Nelson H. F. Beebe <beebe@math.utah.edu>.
| -rw-r--r-- | man/files.texi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/man/files.texi b/man/files.texi index a45fd3565e3..4fbf945c38b 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -97,6 +97,8 @@ with @samp{/usr/tmp/} and you add @samp{/x1/rms/foo}, you get | |||
| 97 | first slash in the double slash; the result is @samp{/x1/rms/foo}. | 97 | first slash in the double slash; the result is @samp{/x1/rms/foo}. |
| 98 | @xref{Minibuffer File}. | 98 | @xref{Minibuffer File}. |
| 99 | 99 | ||
| 100 | @cindex environment variables in file names | ||
| 101 | @cindex expansion of environment variables | ||
| 100 | @samp{$} in a file name is used to substitute environment variables. | 102 | @samp{$} in a file name is used to substitute environment variables. |
| 101 | For example, if you have used the shell command @command{export | 103 | For example, if you have used the shell command @command{export |
| 102 | FOO=rms/hacks} to set up an environment variable named @env{FOO}, then | 104 | FOO=rms/hacks} to set up an environment variable named @env{FOO}, then |
| @@ -107,10 +109,16 @@ alternatively, it may be enclosed in braces after the @samp{$}. Note | |||
| 107 | that shell commands to set environment variables affect Emacs only if | 109 | that shell commands to set environment variables affect Emacs only if |
| 108 | done before Emacs is started. | 110 | done before Emacs is started. |
| 109 | 111 | ||
| 112 | @cindex home directory shorthand | ||
| 113 | You can use the @file{~/} in a file name to mean your home directory, | ||
| 114 | or @file{~@var{user-id}/} to mean the home directory of a user whose | ||
| 115 | login name is @code{user-id}. | ||
| 116 | |||
| 110 | To access a file with @samp{$} in its name, type @samp{$$}. This pair | 117 | To access a file with @samp{$} in its name, type @samp{$$}. This pair |
| 111 | is converted to a single @samp{$} at the same time as variable | 118 | is converted to a single @samp{$} at the same time as variable |
| 112 | substitution is performed for single @samp{$}. Alternatively, quote the | 119 | substitution is performed for single @samp{$}. Alternatively, quote the |
| 113 | whole file name with @samp{/:} (@pxref{Quoted File Names}). | 120 | whole file name with @samp{/:} (@pxref{Quoted File Names}). File names |
| 121 | which begin with a literal @samp{~} should also be quoted with @samp{/:}. | ||
| 114 | 122 | ||
| 115 | @findex substitute-in-file-name | 123 | @findex substitute-in-file-name |
| 116 | The Lisp function that performs the substitution is called | 124 | The Lisp function that performs the substitution is called |