The previous test condition would cause errors because even though brew didn't
exist, the directory /share/zsh/site-functions did and it would throw error
messages on non-homebrew systems.
This adds the argparse library [1] as autojump_argparse and imports it
via sys.path mangling in case argparse does not exist (Python 2.6 or
below without argparse installed).
This makes autojump effectively work with Python 2.6 again by default.
I have not verified license compatibility, but given the intention of
the (backport) project this is likely OK (it is licensed under the
Python license).
1: http://code.google.com/p/argparse/
Fixes issue #121.
Also added unit test coverage to check database initialization, saving, and
loading. Unit tests also revealed that migration code was not working properly
(starts database from scratch instead of copying existing entries over).
--stat added, jumpstat alias removed.
Options passed to the `j` function will now be passed on autojump. As a result,
directories beginning with `-` are no longer supported.
A -s short alias for --stat is added. Instead of using jumpstat, use `j --stat`
or `j -s` instead.
As best I can tell, ZSH introduced the "=~" condition somewhere around 4.3.5 or
4.3.9. In either case, autojump will use =~ for versions higher than 4.3.5 and
-pcre-match for older versions of ZSH.
In the past the installer would modify the user's ~/.bashrc and thus needed to
find the current user's name and home directory. However, the installer no
longer modifies user's ~/.bashrc and getent also outputs error messages for
Cygwin users.