summaryrefslogtreecommitdiff
path: root/man/rcdn.1
blob: 6ac8a2fba447dde41e7677eb078c6d4bb0eaeb25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.Dd August 2, 2013
.Dt RCDN 1
.Os
.Sh NAME
.Nm rcdn
.Nd remove dotfiles as managed by rcm
.Sh SYNOPSIS
.Nm rcdn
.Op Fl hqVv
.Op Fl B Ar hostname
.Op Fl d Ar dir
.Op Fl I Ar excl_pat
.Op Fl S Ar excl_pat
.Op Fl t Ar tag
.Op Fl x Ar excl_pat
.Op Ar files ...
.Sh DESCRIPTION
This program will remove all the rc files that the
.Xr rcm 7
suite knows about. This can be further controlled with the
.Fl t
and
.Fl d
flags.
.Pp
The files that are removed are symlinks. However, the
.Va COPY_ALWAYS
setting in
.Xr rcrc 5
modifies this. If a rc file is not a symlink but an ancestor directory
is, that directory is removed. If a rc file is not a symlink but is
listed in
.Va COPY_ALWAYS
the file is removed.
.Pp
The
.Nm
program will run hooks before and after removing files, if these hooks
exist. Hooks are executable programs inside the dotfiles directory, with
the following names:
.Pa hooks/pre-down and
.Pa hooks/post-down .
These hooks are run each time
.Nm
is run and therefore must be idempotent.
.
.Bl -tag -width "-I EXCL_PAT"
.It Fl B Ar HOSTNAME
treat
.Pa host-HOSTNAME
as the host-specific directory instead of computing it
.It Fl d Ar DIR
remove rc files from the
.Ar DIR .
This can be specified multiple times.
.It Fl h
show usage instructions.
.It Fl I Ar EXCL_PAT
remove rc files that match
.Ar EXCL_PAT
despite being excluded by the
.Fl x
flag or a setting in
.Xr rcrc 5 .
This can be repeated with additional patterns. See
.Xr lsrc 1 ,
.Sx EXCLUDE PATTERN ,
for more details.
.It Fl K
skip pre- and post-hooks
.It Fl k
run pre- and post-hooks. This is the default.
.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
.It Fl v
increase verbosity. This can be repeated for extra verbosity.
.It Fl V
show the version number.
.It Fl x Ar EXCL_PAT
do not remove rc files that match
.Ar EXCL_PAT .
This can be repeated with additional patterns. See
.Xr lsrc 1 ,
.Sx EXCLUDE PATTERN ,
for more details.
.It Ar files
only remove the specified file(s)
.El
.
.Sh ENVIRONMENT
.Bl -tag -width ".Ev RCRC"
.It Ev RCRC
User configuration file. Defaults to
.Pa ~/.rcrc .
.El
.Sh FILES
.Pa ~/.rcrc
.Sh EXAMPLES
.Dl rcdn -v
.Dl rcdn zshrc
.Dl rcdn -t python
.Dl rcdn -d ~/corporate-dotfiles
.Dl rcdn -e '*:.zshrc'
.Sh SEE ALSO
.Xr lsrc 1 ,
.Xr mkrc 1 ,
.Xr rcup 1 ,
.Xr rcrc 5 ,
.Xr rcm 7
.Sh AUTHORS
.An "Mike Burns" Aq mike@mike-burns.com