Add POSIX shell support
Any users of a shell that adheres to the POSIX standard should now be
supported. Shells that were tested while this feature was in development
include `mrsh`, `dash`, busybox `ash`, and `bash --posix`.
The hook works by defining a `_zoxide_hook` function and adding it to
the shell's `PS1` (causing it to be evaluated every time the prompt is
redrawn).
The PWD hook has been removed, because it is impossible to implement in
a POSIX-compliant and satisfactory way.
If the user passes the `--merge` flag to the `migrate` subcommand, all
duplicate entries will have their ranks and epochs updated: the rank
will be the sum of the stored rank and the newly-parsed rank, while the
epoch will be the maximum of the stored epoch and the newly-parsed
epoch.
This allows one to import from the `z` database even after having used
`zoxide` for any amount of time. This also permits a user who has
already sourced the init script to import their old database without
needing to do something like `rm ~/.zo && zoxide migrate ~/.z`.
Migrate from `z` database
The new `migrate` subcommand takes in a path to the old `z` database and
naively parses it to add to the database. The command will fail if the user already has a database, so as to prevent tainting it in any way.
* Migrate errors from failure to anyhow
* Migrate argument parsing from clap to structopt
* Empty z command now goes to $HOME
* DB updates are now atomic and isolated