summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorGravatar Pablo Olmos de Aguilera Corradini and Mike Burns <pablo@glatelier.org>2013-10-27 17:16:30 -0300
committerGravatar Mike Burns <mike@mike-burns.com>2014-02-18 16:57:01 +0100
commit3700be9ce6802653df30c413179d93316bf0b291 (patch)
tree5e78da946c28e12b4a5fb760779d8e8689c02540 /man
parent83c4875e23bb7595689ddd228a9825264b15f318 (diff)
Force some directories to be symlinks
Typically a directory structure is copied instead of symlinked, while files are symlinked. However, some cases require symlinked dirs: git submodules, vim plugins, and so on. This introduces a `SYMLINK_DIRS` option for rcrc(5) that takes a space-separated list of "exclude patterns". Any directory matching these patterns is symlinked. This also introduces a `-S` argument for lsrc(1), rcup(1), and rcdn(1). This argument takes a pattern, for one-off directory symlinking. It can be repeated. This also introduces `-S` and `-s` for mkrc(1). `-S` will re-install the files as symlinks, and `-s` will not. This does work with `-C`, though perhaps unintuitively - we don't know what the user means in this case. However, it will not crash. Bug: `-s` does not work right if `SYMLINK_DIRS` is set. Bug #36 addresses this.
Diffstat (limited to 'man')
-rw-r--r--man/lsrc.18
-rw-r--r--man/mkrc.111
-rw-r--r--man/rcdn.15
-rw-r--r--man/rcrc.59
-rw-r--r--man/rcup.15
5 files changed, 37 insertions, 1 deletions
diff --git a/man/lsrc.1 b/man/lsrc.1
index 6070428..984a378 100644
--- a/man/lsrc.1
+++ b/man/lsrc.1
@@ -1,4 +1,4 @@
-.Dd July 28, 2013
+.Dd February 7, 2014
.Dt LSRC 1
.Os
.Sh NAME
@@ -11,6 +11,7 @@
.Op Fl I Ar excl_pat
.Op Fl t Ar tag
.Op Fl x Ar excl_pat
+.Op Fl N Ar excl_pat
.Op files ...
.Sh DESCRIPTION
This program lists all configuration files, both the sources in the
@@ -50,6 +51,11 @@ more details are in the
.Sx EXCLUDE PATTERN
section.
.
+.It Fl S Ar excl_pat
+symlink the directory that match the given pattern. See
+.Sx EXCLUDE PATTERN
+for more details. This option can be repeated.
+.
.It Fl t Ar TAG
list dotfiles according to TAG
.
diff --git a/man/mkrc.1 b/man/mkrc.1
index 384b485..adc4089 100644
--- a/man/mkrc.1
+++ b/man/mkrc.1
@@ -28,6 +28,16 @@ multiple times.
install dotfiles into the host-specific directory
.It Fl q
decrease verbosity
+.It Fl s
+if the rc file is a file, symlink it; otherwise, make a directory
+structure as described in
+.Xr rcup 1
+in the section
+.Sx ALGORITHM .
+This is the default.
+.It Fl S
+treat the specified rc files as files to be symlinked, even if they are
+directories
.It Fl t Ar TAG
install dotfiles according to tag
.It Fl v
@@ -47,6 +57,7 @@ User configuration file. Defaults to
.Dl mkrc -t zsh -d company-dotfiles ~/.zshrc ~/.zlogin
.Dl mkrc -o ~/.rcrc
.Dl mkrc -C .ssh
+.Dl mkrc -S .zpretzo
.Sh SEE ALSO
.Xr lsrc 1 ,
.Xr rcdn 1 ,
diff --git a/man/rcdn.1 b/man/rcdn.1
index 43780ca..a276b76 100644
--- a/man/rcdn.1
+++ b/man/rcdn.1
@@ -64,6 +64,11 @@ run pre- and post-hooks. This is the default.
skip pre- and post-hooks
.It Fl q
decrease verbosity
+.It Fl S Ar EXCL_PAT
+when removing dotfiles, any file that matches
+.Ar EXCL_PAT
+should be treated as a file that was symlinked, even if it is a
+directory. This can be repeated.
.It Fl t Ar TAG
remove dotfiles according to
.Ar TAG
diff --git a/man/rcrc.5 b/man/rcrc.5
index ec6ef9a..ca6e22e 100644
--- a/man/rcrc.5
+++ b/man/rcrc.5
@@ -46,6 +46,14 @@ under the section
.
.It Va TAGS
the default tags.
+.
+.It Va SYMLINK_DIRS
+a space-separated list of patterns. Directories matching a pattern are
+symlinked instead of descended. Patterns are explained in detail in
+.Xr lsrc 1
+under the section
+.Sx EXCLUDE PATTERN .
+.
.El
.Sh FILES
.Pa ~/.rcrc
@@ -55,6 +63,7 @@ the default tags.
.Dl DOTFILES_DIRS="/home/mike/.dotfiles /usr/share/dotfiles"
.Dl EXCLUDES="irbrc *:*emacs* dotfiles:python*"
.Dl TAGS="freebsd development email git laptop gmail notmuch"
+.Dl SYMLINK_DIRS="zprezto"
.Sh SEE ALSO
.Xr lsrc 1 ,
.Xr mkrc 1 ,
diff --git a/man/rcup.1 b/man/rcup.1
index 3304436..41e25fd 100644
--- a/man/rcup.1
+++ b/man/rcup.1
@@ -56,6 +56,11 @@ run pre- and post-hooks (see
for more details on hooks). This is the default.
.It Fl K
skip pre- and post-hooks
+.It Fl S Ar EXCL_PAT
+any rc file that matches
+.Ar EXCL_PAT
+is installed as if it were a file (using a symlink) instead of as if it
+were a directory (by making a directory). This option can be repeated.
.It Fl t Ar TAG
install dotfiles according to
.Ar TAG