Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
homeshick is installed as a managed repository (AKA castle), this way it can keep itself updated. In order to create the castle, simply clone it to the appropriate location.
git clone git://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick
Now lets make homeshick work when we type
printf '\nsource "$HOME/.homesick/repos/homeshick/homeshick.sh"' >> $HOME/.bashrc
This adds a line to your
.bashrc which includes a script that defines the
fish shell users must use the
homeshick.fish file instead:
echo -en '\n. "$HOME/.homesick/repos/homeshick/homeshick.fish"' >> "$HOME/.config/fish/config.fish"
If you use csh or tcsh, you must use a different approach (C shell does not support shell functions).
.cshrc like this:
printf '\nalias homeshick source "$HOME/.homesick/repos/homeshick/bin/homeshick.csh"\n' >> $HOME/.cshrc
To get the function/alias working right away, you will have to rerun your
source $HOME/.config/fish/config.fish or your
Note: The reason we want to define a function/use
source instead of aliasing
homeshick is because of the
homeshick cannot change the working directory of your current shell if it is invoked as a subprocess.
You may also want to set up automatic refreshing of your repositories, to always stay up to date with any changes. To speed up the setup process on new machines, have a look at the automatic deployment script.
On OS X you can also install homeshick via Homebrew:
brew install homeshick
Further integration instructions are provided via the formula after installation.
homeshick comes with its own tab completion scripts. There are scripts for bash and zsh. They allow you to tab complete all available commands and supply you with possible castle names.
To get tab completion working in bash, simply source
completions/homeshick-completion.bash somewhere in your
printf '\nsource "$HOME/.homesick/repos/homeshick/completions/homeshick-completion.bash"' >> $HOME/.bashrc
ZSH autoloads its completion scripts.
In order for ZSH to know that there exists a homeshick completion script
you have to add the
homeshick/completions directory to the ZSH tab completion
printf '\nfpath=($HOME/.homesick/repos/homeshick/completions $fpath)' >> $HOME/.zshrc
NOTE: you may need to ensure that this line comes before the
compinit line. If you are using
oh-my-zsh, the homeshick
fpath modification may need to come before sourcing
oh-my-zsh. For example:
source "$HOME/.homesick/repos/homeshick/homeshick.sh" fpath=($HOME/.homesick/repos/homeshick/completions $fpath) source $ZSH/oh-my-zsh.sh
See Issue #89 for more details.
To get tab completion working in fish shell, simply source
$HOME/.homesick/repos/homeshick/completions/homeshick.fish somewhere in your fish configuration (i.e.
$HOME/.config/fish/config.fish), for instance like: