summaryrefslogtreecommitdiff
path: root/man/lsrc.1
diff options
context:
space:
mode:
authorGravatar Mike Burns <mike@mike-burns.com>2013-08-04 10:35:14 -0400
committerGravatar Mike Burns <mike@mike-burns.com>2013-08-05 04:21:21 +0200
commit63b50643b0ffd287d0070e494625056a05081ce8 (patch)
tree0ee843065deed78edf646f11f8d46ff28c6964ba /man/lsrc.1
parent17c803d03d20f84cb37873e05d1539dbe7d43a77 (diff)
Introduce exclusion patterns
The lsrc(1), rcup(1), and rcdn(1) commands now take any number of `-e` flags, used to specify an exclusion pattern. This can also be controlled via rcrc(5), the `EXCLUDES` variable. An exclusion pattern specifies a file glob to skip. In the case of lsrc(1), any file matching the glob is not listed; in rcup(1) it is not symlinked; and in rcdn(1) it is not removed. The file glob can be preceded by the name of a dotfiles directory (separated from the file glob by a colon) to increase the specificity. Useful for: rcdn -e rcrc rcup -d work-dotfiles -e bashrc rcup -d ~/.dotfiles -d wife-dotfiles -d sys-dotfiles -e wife-dotfiles:tigrc
Diffstat (limited to 'man/lsrc.1')
-rw-r--r--man/lsrc.144
1 files changed, 38 insertions, 6 deletions
diff --git a/man/lsrc.1 b/man/lsrc.1
index ff67a1f..863ceb8 100644
--- a/man/lsrc.1
+++ b/man/lsrc.1
@@ -9,6 +9,7 @@
.Op Fl vq
.Op Fl t Ar tag
.Op Fl d Ar dir
+.Op Fl e Ar excl_pat
.Op files ...
.Sh DESCRIPTION
This program lists all configuration files, both the sources in the
@@ -23,21 +24,52 @@ section, for details on the directory layout.
It supports these options:
.
.Bl -tag
-.It Fl v
-increase verbosity. This can be repeated for extra verbosity.
-.
-.It Fl q
-decrease verbosity
-.
.It Fl t Ar TAG
list dotfiles according to TAG
.
.It Fl d Ar DIR
list dotfiles from the DIR. This can be specified multiple times.
.
+.It Fl e Ar excl_pat
+Exclude the files that matches the given pattern. See
+.Sx EXCLUDE PATTERN
+for more details. This option can be repeated.
+.
+.It Fl v
+increase verbosity. This can be repeated for extra verbosity.
+.
+.It Fl q
+decrease verbosity
+.
.It Ar files ...
only list the specified file(s)
.El
+.Sh EXCLUDE PATTERN
+The exclude pattern specifies a colon-separated pair of dotfiles
+directory and file glob. The dotfiles directory is optional and, if
+omitted, defaults to
+.Li * ,
+which is a special token that matches any dotfiles directory. The file
+glob is relative to the dotfiles directory, ignoring meta directories. A
+colon combines them.
+.
+.Pp
+For example, to ignore all emacs-related items from the
+.Pa thoughtbot-dotfiles
+directory, use the exclude pattern:
+.Pp
+.Dl thoughtbot-dotfiles:*emacs*
+.Pp
+To ignore any
+.Pa bash_profile
+file, use the pattern:
+.Pp
+.Dl *:bash_profile
+.Pp
+Or more simply:
+.Pp
+.Dl bash_profile
+.Pp
.Sh FILES
.Pa ~/.dotfiles
.Pa ~/.rcrc