#!/usr/bin/env sh
# This script should be sourced in the context of your shell like so:
# source $HOME/.homeshick/repos/.homeshick/homeshick.sh
# Once the homeshick() function is defined, you can type
# "homeshick cd CASTLE" to enter a castle.

homeshick () {
	if [ "$1" = "cd" ] && [ -n "$2" ]; then
		# We want replicate cd behavior, so don't use cd ... ||
		# shellcheck disable=SC2164
		cd "$HOME/.homesick/repos/$2"
	else
		"${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}/bin/homeshick" "$@"
	fi
}

#!/usr/bin/env sh
# This script should be sourced in the context of your shell like so:
# source $HOME/.homesick/repos/.homeshick/homeshick.sh
# Once the homeshick() function is defined, you can type
# "homeshick cd CASTLE" to enter a castle.

homeshick () {
	if [ "$1" = "cd" ] && [ -n "$2" ]; then
		# We want replicate cd behavior, so don't use cd ... ||
		# shellcheck disable=SC2164
		cd "$HOME/.homesick/repos/$2"
	else
		"${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}/bin/homeshick" "$@"
	fi
}

Fix typo in comment as noted by @tsaber
Fix typo in comment as noted by @tsaber

https://github.com/andsens/homeshick/commit/bbd1589dbb521893d155a57615f53cdd0b4f11b4#r37659851
