@@ -139,6 +139,22 @@ option. For example:
139
139
.Pp
140
140
.Dl mkrc -U bin
141
141
.
142
+ .Ss COMMON PROBLEM: CHANGING THE TARGET LOCATION DEPENDENT ON THE VALUE OF AN ENVIRONMENT VARIABLE
143
+ By default, the rcm suite will assume that all dotfiles are installed relative to
144
+ .Pa $HOME .
145
+ If instead, the dotfiles are to be installed to, say,
146
+ .Pa $XDG_CONFIG_HOME ,
147
+ there are two options:
148
+
149
+ The default target can be redefined by using
150
+ .Va TARGET
151
+ location in the rcrc file, or by using the
152
+ .Fl T
153
+ flag. References to environment variables can be specified in any of these,
154
+ e.g.
155
+ .Pp
156
+ .Dl rcup -T $XDG_CONFIG_HOME
157
+ .
142
158
.Sh QUICK START FOR EMPTY DOTFILES DIRECTORIES
143
159
This section is for those who do not have an existing dotfiles
144
160
directory and whose dotfiles are standard.
@@ -249,6 +265,35 @@ macOS users should see the
249
265
.Sx BUGS
250
266
section for more details.
251
267
.
268
+ .Sh ALTERNATIVE TARGET INSTALL LOCATIONS
269
+ .
270
+ Sometimes it is useful to instruct rcm to install dotfiles to a location
271
+ other than
272
+ .Sx $HOME .
273
+
274
+ The default target directory is taken to be the first specified by:
275
+ .Bl -enum offset indent -compact
276
+ .It
277
+ command-line flag
278
+ .Fl T ,
279
+ for an invocation of rcup, rcdn, or lsrc.
280
+ .It
281
+ Variable
282
+ .Va TARGET
283
+ in the rcrc file. (see
284
+ .Xr rcrc 5
285
+ and the
286
+ .Sx FILES
287
+ section below)
288
+ .It
289
+ $HOME
290
+ .El
291
+
292
+ A target location can also be specified on a per dotfiles directory basis.
293
+ This is achieved by placing meta-file
294
+ .Pa target
295
+ in the root, which contains a single line denoting the desired target directory.
296
+
252
297
.Sh STANDALONE INSTALLATION SCRIPT
253
298
.
254
299
The
0 commit comments