-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
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 homeshick
.
printf '\nsource "$HOME/.homesick/repos/homeshick/homeshick.sh"' >> $HOME/.bashrc
This adds a line to your .bashrc
which includes a script that defines the homeshick()
function.
fish shell users must use the homeshick.fish
file instead:
echo -en '\nsource "$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).
Update your .cshrc
like this:
printf '\nalias homeshick source "$HOME/.homesick/repos/homeshick/bin/homeshick.csh"' >> $HOME/.cshrc
To get the function/alias working right away, you will have to rerun your .bashrc
with source $HOME/.bashrc
, config.fish
with source $HOME/.config/fish/config.fish
or your .cshrc
with source $HOME/.cshrc
.
Note: The reason we want to define a function/use source
instead of aliasing
bin/homeshick
to homeshick
is because of the cd command.
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.
To find out how homeshick works in detail you can examine how the commands work or go to the tutorials if you prefer getting to know homeshick by using it.
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 .bashrc
.
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
lookup path.
printf '\nfpath=($HOME/.homesick/repos/homeshick/completions $fpath)' >> $HOME/.zshrc