Fix shell type detection.

This addresses #7 

The problem is that CompletionCommand defines the `--generate-hook` option to have an optional value, although the documentation says it can be treated as a flag (with no value). Setting `--generate-hook` with no value actually has no effect.