Skip to content

Navigation Menu

Sign up
justone edited this page Oct 16, 2010 · 14 revisions

Full Documentation

Tour of files

Besides the README.md and .gitignore, there are four files/directories in the base branch.

  • bin/dfm - The main utility for managing (installing/updating/uploading) dotfiles.
  • .dfminstall - This is a config file for when dfm install is run.
  • .bashrc.load - This file is the bootstrap file for loading any shell customizations. The default only makes sure $HOME/bin is in the path so that dfm can be run easily. This file is loaded because dfm puts the following line at the end of .bashrc on install: . $HOME/.bashrc.load
  • t - Tests for the dfm utility.
# The 'dfm' utility

dfm stands for Dot File Manager. The name was chosen because the best commands (like svn or git) are only three characters.

Running dfm is like running git. There are subcommands, like install and updates that perform different functions. Each subcommand has it's own set of options and there are also options that apply to all subcommands.

The main reason for dfm to exist is to install dotfiles. This is done with the install subcommand. Running dfm install will go through all the files and directories in the repository and install them in $HOME using symlinks.

Skipping

You can control what files are skipped by adding .dfminstall files in your repository. For instance, the default .dfminstall file has the following contents:

README.md skip
t skip

Meaning that both README.md and t will be skipped when running dfm install.

Recursing

You can make dfm install recurse into a given directory by adding its name to the .dfminstall file. For instance, the this .dfminstall file has the following contents:

.ssh
README.md skip
t skip

Meaning that (in addition to the above skips) instead of making ~/.ssh a symlink to ~/.dotfiles/.ssh, the ~/.ssh directory is left alone and files inside of ~/.dotfiles/.ssh are symlinked into ~/.ssh. Put another way, it turns this:

nate@host$ ls -al ~/.ssh
lrwxr-xr-x 1 nate staff 31 Sep 14 11:25 /Users/nate/.ssh -> .dotfiles/.ssh

into this:

nate@host$ ls -al ~/.ssh
total 240
drwxr-xr-x 12 nate staff 408 Oct 14 16:50 .
drwxr-xr-x+ 82 nate staff 2788 Oct 15 23:43 ..
drwxr-xr-x 5 nate staff 170 Sep 14 11:25 .backup
lrwxr-xr-x 1 nate staff 33 Sep 14 11:25 config -> ../.dotfiles/.ssh/config
-rw------- 1 nate staff 1234 Aug 12 2010 id_dsa
-rw-r--r-- 1 nate staff 1234 Aug 12 2010 id_dsa.pub
-rw-r--r-- 1 nate staff 88264 Oct 13 14:55 known_hosts

Very handy for managing files inside directories that are extra volatile or that you just want to leave alone.

All subcommands

Here are the subcommands that are currently defined:

  • install - this installs everything in the repo into $HOME using symlinks
  • updates - this fetches any new changes from the origin remote
  • mergeandinstall or mi - this merges any new changes and re-runs dfm install
  • anything else is interpreted as a git subcommand and in run in the dotfiles repository. For instance, running dfm status is the same as running cd ~/.dotfiles; git status; cd -, but easier.

For more information, run dfm --help or perldoc ~bin/dfm.

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /