Skip to content

Commands

Joel Kuzmarski edited this page Nov 24, 2013 · 9 revisions

homeshick is used via subcommands, so simply typing homeshick will yield a helpful message that tersely explains all of the things you can do with it.

Most subcommands accept castlenames as arguments. You can also run a subcommand on all castles by not specifying any arguments.

link

homeshick link [castlename ...]

This command symlinks all files that reside in the home folders of your castles into your home folder. You will be prompted if there are any files or folders that would be overwritten.

If the castle does not contain a home folder it will simply be ignored. To further understand how the linking process works you can consult the linking table.

clone

homeshick clone username/repo

The clone command clones a new git repository to .homesick/repos. The clone command accepts a github shorthand url, so if you want to clone oh-my-zsh you can type homeshick clone robbyrussell/oh-my-zsh.

pull

homeshick pull [castlename ...]

The pull command runs a git pull on your castle and any of its submodules. If there are any new dotfiles to be linked, homeshick will prompt you whether you want to link them.

check

homeshick check [castlename ...]

check determines the state of a castle.

  • There may be updates on the remote, meaning it is behind.
  • Your castle can also contain unpushed commits, meaning it is ahead.
  • When everything is in sync, check will report that your castle is up to date.

list

homeshick list

You can see your installed castles by running the list command.

track

homeshick track castlename .file [.file2 ...]

If you have a new dotfile that you want to put in one of your castles, you can ask homeshick to do the moving and symlinking for you. To track your .bashrc and .zshrc in your dotfiles castle run homeshick track dotfiles .bashrc .zshrc, the files are automatically added to the git index.

generate

homeshick generate castlename [castlename2 ...]

generate creates a new castle. All you need to do now is call [[track|Commands#track]] to fill it with your dotfiles.

refresh

homeshick refresh

Run this command to check if any of your repositories have not been updated the last week. This goes very well with your rc scripts (check out the tutorial for more about this).

cd

homeshick cd castlename

After you have used the [[track|Commands#track]] command, you will want to commit the changes and push them. Instead of cd'ing your way into the repository simply type homeshick cd dotfiles; homeshick will place you right inside the home/ directory of your dotfiles castle. From there you can run whatever git commands you like on your castle.

Tip: cd - places you in your previous directory, so if you did not change directories after running homeshick cd dotfiles you can simply type cd - to get back to where you left off.

Clone this wiki locally