summaryrefslogtreecommitdiff
path: root/man/rcdn.1
blob: df83e60eff77b3261ba198d01853b4d4b9cf76f3 (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
.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 hKkqVv
.Op Fl B Ar hostname
.Op Fl d Ar dir
.Op Fl I Ar excl_pat
.Op Fl S Ar excl_pat
.Op Fl s Ar excl_pat
.Op Fl t Ar tag
.Op Fl U Ar excl_pat
.Op Fl u Ar excl_pat
.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.
.Pp
Hooks will be executed one at a time, sorted alphabetically. For instance,
.Pa hooks/pre-down/animals
will run before
.Pa hooks/pre-down/aquariums ,
and
.Pa hooks/pre-down/4-eyes
will run before
.Pa hooks/post-down/2-u-nothing-compares .
.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 s Ar EXCL_PAT
when removing dotfiles, any directory that matches
.Ar EXCL_PAT
should be recurred upon like normal. This is the default, and is the opposite of
.Fl S .
This can be repeated.
.It Fl t Ar TAG
remove dotfiles according to
.Ar TAG
.It Fl U Ar EXCL_PAT
any rc file or directory that matches
.Ar EXCL_PAT
is considered to have been installed without a leading dot when removing them.
Must be specified for rc files or directories that were indeed installed
without a leading dot. This can be repeated. See the
documentation of the
.Fl U
option in
.Xr lsrc 1
for more information.
.It Fl u Ar EXCL_PAT
any rc file or directory that matches
.Ar EXCL_PAT
is considered to have been installed with a leading dot when removing them.
This is the default, and is the opposite of
.Fl U .
This can be repeated. See the
documentation of the
.Fl u
option in
.Xr lsrc 1
for more information.
.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 -x '*:.zshrc'
.Sh SEE ALSO
.Xr lsrc 1 ,
.Xr mkrc 1 ,
.Xr rcup 1 ,
.Xr rcrc 5 ,
.Xr rcm 7
.Sh AUTHORS
.Nm
is maintained by
.An "Mike Burns" Aq Mt mburns@thoughtbot.com
and
.Lk http://thoughtbot.se thoughtbot