aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-02-23 11:23:10 +0000
committerEli Zaretskii2001-02-23 11:23:10 +0000
commit3d85335156de38fb62d56131b65052d1aba8a2da (patch)
tree803af88f362738c7268d89d8c2b141f3f0ca157a
parentae529c6424da1d6ca863d6e1bd2d91f97e39a18a (diff)
downloademacs-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.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
97first slash in the double slash; the result is @samp{/x1/rms/foo}. 97first 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.
101For example, if you have used the shell command @command{export 103For example, if you have used the shell command @command{export
102FOO=rms/hacks} to set up an environment variable named @env{FOO}, then 104FOO=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
107that shell commands to set environment variables affect Emacs only if 109that shell commands to set environment variables affect Emacs only if
108done before Emacs is started. 110done 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,
114or @file{~@var{user-id}/} to mean the home directory of a user whose
115login 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
111is converted to a single @samp{$} at the same time as variable 118is converted to a single @samp{$} at the same time as variable
112substitution is performed for single @samp{$}. Alternatively, quote the 119substitution is performed for single @samp{$}. Alternatively, quote the
113whole file name with @samp{/:} (@pxref{Quoted File Names}). 120whole file name with @samp{/:} (@pxref{Quoted File Names}). File names
121which 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