| 1 |
.Dd December 23, 2016 |
| 2 |
.Dt LSRC 1 |
| 3 |
.Os |
| 4 |
.Sh NAME |
| 5 |
.Nm lsrc |
| 6 |
.Nd show dotfiles files managed by rcm |
| 7 |
.Sh SYNOPSIS |
| 8 |
.Nm lsrc |
| 9 |
.Op Fl FhqVv |
| 10 |
.Op Fl B Ar hostname |
| 11 |
.Op Fl d Ar dir |
| 12 |
.Op Fl I Ar excl_pat |
| 13 |
.Op Fl S Ar excl_pat |
| 14 |
.Op Fl s Ar excl_pat |
| 15 |
.Op Fl t Ar tag |
| 16 |
.Op Fl U Ar excl_pat |
| 17 |
.Op Fl u Ar excl_pat |
| 18 |
.Op Fl x Ar excl_pat |
| 19 |
.Op files ... |
| 20 |
.Sh DESCRIPTION |
| 21 |
This program lists all configuration files, both the sources in the |
| 22 |
dotfiles directories and the destinations in your home directory. |
| 23 |
. |
| 24 |
See |
| 25 |
.Xr rcup 1 , |
| 26 |
the |
| 27 |
.Sx DIRECTORY LAYOUT |
| 28 |
section, for details on the directory layout. |
| 29 |
. |
| 30 |
It supports these options: |
| 31 |
. |
| 32 |
.Bl -tag -width "-I excl_pat" |
| 33 |
.It Fl B Ar HOSTNAME |
| 34 |
treat |
| 35 |
.Pa host-HOSTNAME |
| 36 |
as the host-specific directory instead of computing it based on the |
| 37 |
computer's hostname |
| 38 |
.It Fl d Ar DIR |
| 39 |
list dotfiles from the DIR. This can be specified multiple times. |
| 40 |
. |
| 41 |
.It Fl F |
| 42 |
show symbols next to each file indicating status information. Supported |
| 43 |
symbols are |
| 44 |
.Li @ |
| 45 |
which indicates that the file is a symlink, |
| 46 |
.Li $ |
| 47 |
which indicates it's a symlinked directory, and |
| 48 |
.Li X |
| 49 |
to indicate that the file is a copy. More details on copied files and |
| 50 |
symlinked directories can be found in |
| 51 |
.Xr rcrc 5 |
| 52 |
under the documentation on |
| 53 |
.Va COPY_ALWAYS |
| 54 |
and |
| 55 |
.Va SYMLINK_DIRS , |
| 56 |
respectively. |
| 57 |
. |
| 58 |
.It Fl h |
| 59 |
show usage instructions. |
| 60 |
. |
| 61 |
.It Fl I Ar excl_pat |
| 62 |
include the files that match the given pattern. This is applied after |
| 63 |
any |
| 64 |
.Fl x |
| 65 |
options. It uses the same pattern language as |
| 66 |
.Fl x ; |
| 67 |
more details are in the |
| 68 |
.Sx EXCLUDE PATTERN |
| 69 |
section. Note that you may have to quote the exclude pattern so the |
| 70 |
shell does not evaluate the glob. |
| 71 |
. |
| 72 |
.It Fl S Ar excl_pat |
| 73 |
symlink the directories that match the given pattern. See |
| 74 |
.Sx EXCLUDE PATTERN |
| 75 |
for more details. This option can be repeated. You may need to quote the |
| 76 |
pattern to prevent the shell from swallowing the glob. |
| 77 |
. |
| 78 |
.It Fl s Ar excl_pat |
| 79 |
if a directory matches the given pattern, recur inside of it instead of |
| 80 |
symlinking. See |
| 81 |
.Sx EXCLUDE PATTERN |
| 82 |
for more details. This is the opposite of the |
| 83 |
.Fl S |
| 84 |
option, and can be used to undo it or the |
| 85 |
.Va SYMLINK_DIRS |
| 86 |
setting in your |
| 87 |
.Xr rcrc 5 |
| 88 |
configuration. It can be repeated, and the pattern may need to be quoted to |
| 89 |
protect it from your shell. |
| 90 |
. |
| 91 |
.It Fl t Ar TAG |
| 92 |
list dotfiles according to TAG |
| 93 |
. |
| 94 |
.It Fl U Ar excl_pat |
| 95 |
the rc files or directories matching this pattern will not be symlinked or |
| 96 |
created with a leading dot. See |
| 97 |
.Sx EXCLUDE PATTERN |
| 98 |
for more details. This option can be repeated. You may need to quote the |
| 99 |
pattern to prevent the shell from swallowing the glob. |
| 100 |
. |
| 101 |
.It Fl u Ar excl_pat |
| 102 |
if an rc file or directory matches the given pattern, it must be dotted. See |
| 103 |
.Sx EXCLUDE PATTERN |
| 104 |
for more details. This is the opposite of the |
| 105 |
.Fl U |
| 106 |
option, and can be used to undo it or the |
| 107 |
.Va UNDOTTED |
| 108 |
setting in your |
| 109 |
.Xr rcrc 5 |
| 110 |
configuration. This option can be repeated. You may need to quote the |
| 111 |
pattern to prevent the shell from swallowing the glob. |
| 112 |
. |
| 113 |
.It Fl V |
| 114 |
show the version number. |
| 115 |
. |
| 116 |
.It Fl v |
| 117 |
increase verbosity. This can be repeated for extra verbosity. |
| 118 |
. |
| 119 |
.It Fl q |
| 120 |
decrease verbosity |
| 121 |
. |
| 122 |
.It Fl x Ar excl_pat |
| 123 |
exclude the files that match the given pattern. See |
| 124 |
.Sx EXCLUDE PATTERN |
| 125 |
for more details. This option can be repeated. Quote the pattern if it |
| 126 |
contains a valid shell glob. |
| 127 |
. |
| 128 |
.It Ar files ... |
| 129 |
only list the specified file(s) |
| 130 |
.El |
| 131 |
.Sh EXCLUDE PATTERN |
| 132 |
The exclude pattern specifies a colon-separated pair of dotfiles |
| 133 |
directory and file glob. The dotfiles directory is optional and, if |
| 134 |
omitted, defaults to |
| 135 |
.Li * , |
| 136 |
which is a special token that matches any dotfiles directory. The file |
| 137 |
glob is relative to the dotfiles directory, ignoring meta directories. A |
| 138 |
colon combines them. |
| 139 |
. |
| 140 |
.Pp |
| 141 |
For example, to ignore all emacs-related items from the |
| 142 |
.Pa thoughtbot-dotfiles |
| 143 |
directory, use the exclude pattern: |
| 144 |
.Pp |
| 145 |
.Dl thoughtbot-dotfiles:*emacs* |
| 146 |
.Pp |
| 147 |
To ignore any |
| 148 |
.Pa bash_profile |
| 149 |
file, use the pattern: |
| 150 |
.Pp |
| 151 |
.Dl *:bash_profile |
| 152 |
.Pp |
| 153 |
Or more simply: |
| 154 |
.Pp |
| 155 |
.Dl bash_profile |
| 156 |
.Pp |
| 157 |
. |
| 158 |
Since exclude patterns are often valid shell globs, be sure to quote |
| 159 |
them. See the caveats noted in |
| 160 |
.Sx BUGS |
| 161 |
when using an exclude pattern. |
| 162 |
.Sh ENVIRONMENT |
| 163 |
.Bl -tag -width ".Ev RCRC" |
| 164 |
.It Ev RCRC |
| 165 |
User configuration file. Defaults to |
| 166 |
.Pa ~/.rcrc . |
| 167 |
.El |
| 168 |
.Sh FILES |
| 169 |
.Pa ~/.dotfiles |
| 170 |
.Pa ~/.rcrc |
| 171 |
.Sh SEE ALSO |
| 172 |
.Xr mkrc 1 , |
| 173 |
.Xr rcdn 1 , |
| 174 |
.Xr rcup 1 , |
| 175 |
.Xr rcrc 5 , |
| 176 |
.Xr rcm 7 |
| 177 |
.Sh AUTHORS |
| 178 |
.Nm |
| 179 |
is maintained by |
| 180 |
.An "Mike Burns" Aq Mt [email protected] |
| 181 |
and |
| 182 |
.Lk http://thoughtbot.com thoughtbot |