summaryrefslogtreecommitdiff
path: root/man/files.texi
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-02-23 11:23:10 +0000
committerEli Zaretskii <eliz@gnu.org>2001-02-23 11:23:10 +0000
commita7c64cc45f5a2b42069e731db6411ecd0116fcd5 (patch)
tree6c0f23800d28ce9c9ae160e0bb61603f2eab372e /man/files.texi
parent0f04f3f8a50bd93c65c66c0da335575b25f5f187 (diff)
downloademacs-a7c64cc45f5a2b42069e731db6411ecd0116fcd5.tar.gz
(File Names): Add documentation of the tilde expansion in file names.
From Nelson H. F. Beebe <beebe@math.utah.edu>.
Diffstat (limited to 'man/files.texi')
-rw-r--r--man/files.texi10
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
first slash in the double slash; the result is @samp{/x1/rms/foo}.
@xref{Minibuffer File}.
+@cindex environment variables in file names
+@cindex expansion of environment variables
@samp{$} in a file name is used to substitute environment variables.
For example, if you have used the shell command @command{export
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
that shell commands to set environment variables affect Emacs only if
done before Emacs is started.
+@cindex home directory shorthand
+ You can use the @file{~/} in a file name to mean your home directory,
+or @file{~@var{user-id}/} to mean the home directory of a user whose
+login name is @code{user-id}.
+
To access a file with @samp{$} in its name, type @samp{$$}. This pair
is converted to a single @samp{$} at the same time as variable
substitution is performed for single @samp{$}. Alternatively, quote the
-whole file name with @samp{/:} (@pxref{Quoted File Names}).
+whole file name with @samp{/:} (@pxref{Quoted File Names}). File names
+which begin with a literal @samp{~} should also be quoted with @samp{/:}.
@findex substitute-in-file-name
The Lisp function that performs the substitution is called