homeshick `cd` command doesn't work on Homebrew install
TravisCarden opened this issue · comments
Travis Carden commented
I just installed homeshick on two Macbooks with the same specs and software installed. On one I installed via Git clone and on the other via Homebrew. When I run homeshick cd CASTLE
, it works with the Git cloned install but not with the Homebrew install, on which I get this output:
$ homeshick cd dotfiles
cd: cd [-L|-P] [dir]
Change the current directory to DIR. The variable $HOME is the
default DIR. The variable CDPATH defines the search path for
the directory containing DIR. Alternative directory names in CDPATH
are separated by a colon (:). A null directory name is the same as
the current directory, i.e. `.'. If DIR begins with a slash (/),
then CDPATH is not used. If the directory is not found, and the
shell option `cdable_vars' is set, then try the word as a variable
name. If that variable has a value, then cd to the value of that
variable. The -P option says to use the physical directory structure
instead of following symbolic links; the -L option forces symbolic links
to be followed.
Travis Carden commented
Oh, look at that: I found the answer to my own question. I guess this issue will serve as documentation, then.
I just needed to add a couple of lines to my bashrc file. See Caveats below:
$ brew info homeshick
homeshick: stable 1.0.0, HEAD
Git dotfiles synchronizer written in bash
https://github.com/andsens/homeshick
/usr/local/Cellar/homeshick/1.0.0 (23 files, 45.9KB) *
Built from source on 2018-03-12 at 12:14:58
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/homeshick.rb
==> Options
--with-csh
Build csh bindings
--with-fish
Build fish bindings
--HEAD
Install HEAD version
==> Caveats
To enable the `homeshick cd <CASTLE>` command, you need to
`export HOMESHICK_DIR=/usr/local/opt/homeshick`
and
`source "/usr/local/opt/homeshick/homeshick.sh"`
in your $HOME/.bashrc
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions