From 63b50643b0ffd287d0070e494625056a05081ce8 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Sun, 4 Aug 2013 10:35:14 -0400 Subject: 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 --- man/rcm.7 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'man/rcm.7') diff --git a/man/rcm.7 b/man/rcm.7 index 69ea809..3a9f659 100644 --- a/man/rcm.7 +++ b/man/rcm.7 @@ -83,10 +83,9 @@ in the directory directory. This will cause a or .Pa ~/.Makefile symlink to be created in your home -directory. The best option here is to move that file outside of your -dotfiles directory or remove it entirely. +directory. Use an exclusion pattern to ignore these. .Pp -.Dl rm -f install Rakefile Makefile install.sh +.Dl rcup -e install -e Rakefile -e Makefile -e install.sh .Ss COMMON PROBLEM: DOTTED FILENAMES IN DOTFILES DIRECTORY A less common situation is for all the filenames in your dotfiles directory to be prefixed with a period. These files are skipped by the @@ -201,6 +200,9 @@ will take precedence over .Pp .Dl rcup -d .dotfiles -d marriage-dotfiles -d thoughtbot-dotfiles .Pp +An exclusion pattern can be tied to a specific dotfiles directory. +.Pp +.Dl rcup -d .dotfiles -d work-dotfiles -e 'work-dotfiles:powrc' . .Sh HOST-SPECIFIC DOTFILES You can also mark host-specific files. This will go by the hostname. The -- cgit v1.2.3