fix the :register command and add unit tests.
add an injection point for showConfirm so that we can get unit test coverage
on what comes through that point.