add "hash -r" and use `command -v` instead of `which`

fixes #22