| RCM(7) | Miscellaneous Information Manual | RCM(7) |
rcm —
lsrc |
mkrc |
rcdn |
rcup |
.*rc files in your home directory
(.zshrc, .vimrc, and so on).
These files have gone by many names in history, such as “rc
files” because they typically end in rc or
“dotfiles” because they begin with a period.
This suite is useful for committing your rc files to a central repository to share, but it also scales to a more complex situation such as multiple source directories shared between computers with some host-specific or task-specific files.
This guide serves as a tutorial motivating the suite. For a list of quick reference documentation see the SEE ALSO section below.
lsrcrcup -vmkrc ~/.tigrcIn the other direction, you can use rcup(1) to create the symlinks from ~/.dotfiles to your home directory.
rcup tigrcrcup -x install -x Rakefile -x
Makefile -x install.shfind ~/.dotfiles -name '.*' -exec
echo mv {} `echo {} | sed 's/.//'` ;Note that this will break any existing symlinks. Those can be safely removed using the rcdn(1) command.
rcdn -v-d DIR
option to rcup(1) or modify
DOTFILES_DIRS in
rcrc(5).
rcup -d configs -vUNDOTTED in
rcrc(5) or use the
-U option. For example:
mkrc -U binmkrc .zshrc .gitconfig
.tigrcrcup -vThis will give you a directory named ~/.dotfiles with your dotfiles in it. Your original dotfiles will be symlinks into this directory. For example, ~/.zshrc will be a symlink to ~/.dotfiles/zshrc.
If you share the dotfiles directory between people, you may end up with some irrelevant or even incorrect rc files. For example, you may have a .zshrc while your other contributor has a .bashrc. This situation can be handled with tags.
tag-. We can handle the competing shell
example by making a tag-zsh directory and moving
the .zshrc file into it using
mkrc(1) and passing the
-t option.
mkrc -t zsh .zshrc-t option to include the tags you want.
This can also be set in the rcrc(5)
configuration file with the TAGS variable.
rcup -t zsh-d flag or
the DOTFILES_DIRS option in
.rcrc.
The following rcup invocation will go in sequence through the three dotfiles directories, updating any symlinks as needed. Any overlapping rc files will use the first result, not the last; that is, .dotfiles/vimrc will take precedence over marriage-dotfiles/vimrc.
rcup -d .dotfiles -d
marriage-dotfiles -d thoughtbot-dotfilesAn exclusion pattern can be tied to a specific dotfiles directory.
rcup -d .dotfiles -d work-dotfiles -x
'work-dotfiles:powrc'mkrc -o .rcrcIf your hostname is difficult to compute, or you otherwise want to
use a different hostname, you can use the -B
flag.
mkrc -B eggplant .rcrcmacOS users should see the BUGS section for more details.
stdout. This is controlled with the
-g flag. Note that this will generate a script to
create an exact replica of the synchronization, including tags, host-specific
files, and dotfiles directories.
env RCRC=/dev/null rcup -B 0 -g >
install.shUsing the above command, you can now run
install.sh to install (or re-install) your rc files.
The install.sh script can be stored in your dotfiles
directory, copied between computers, and so on.
As such, this suite is useful as a common base. Through this we can share tools and develop this further as a first-class entity. It is also our hope that a common set of tools will encourage others to share their dotfiles, too.
rcm is maintained by Mike Burns
<mburns@thoughtbot.com>
and thoughtbot
| July 28, 2013 | Debian |