Merge bitcoindevkit/bdk-cli#224: fix(pretty-format): use `--pretty` in any position
c475363939a5c354fd18732e31d6c2b7ed01f8a7 chore(clippy): clippy fixes (Vadim Anufriev)
daebe537383ac17475ecbe6b9cdebc3a586ecb80 test(pretty): add tests for pretty option (Vadim Anufriev)
17a4dcae2b9b2cea18e27cb31c2da3d74863b93c fix(pretty): use pretty option in any position (Vadim Anufriev)
Pull request description:
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### Description
Fix `--pretty` flag to work in any position by marking it as a global argument.
Previously the flag only worked before subcommands (`bdk-cli --pretty key generate`) but failed after
(`bdk-cli key generate --pretty`).
### Notes to the reviewers
**Before the fix:**
Works:
```bash
-> % cargo run -- --pretty key generate
+-------------+-----------------------------------------------------------------------------------------------------------------+
| Fingerprint |
3e68be40 |
+-------------+-----------------------------------------------------------------------------------------------------------------+
| Mnemonic | wheat equip exhaust funny panic lend message champion slim derive alcohol differ |
+-------------+-----------------------------------------------------------------------------------------------------------------+
| Xprv | tprv8ZgxMBicQKsPdmyStjLXkChBJnUa5DBVJY5J46C3qbe98623M9uqD9wrDtcSZe4hLCodZdKacuY8YPzrNWFUEUwSrpa12KiEBikwLTjiYWP |
+-------------+-----------------------------------------------------------------------------------------------------------------+
```
Doesn't work:
```bash
-> % cargo run -- key generate --pretty
error: unexpected argument '--pretty' found
Usage: bdk-cli key generate [OPTIONS]
For more information, try '--help'.
```
<!-- In this section you can include notes directed to the reviewers, like explaining why some parts
of the PR were done in a specific way -->
## Changelog notice
<!-- Notice the release manager should include in the release tag message changelog -->
<!-- See https://keepachangelog.com/en/1.0.0/ for examples -->
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
#### Bugfixes:
* [ ] This pull request breaks the existing API
* [x] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
ACKs for top commit:
notmandatory:
ACK
c475363939a5c354fd18732e31d6c2b7ed01f8a7
tvpeter:
tACK
c475363939a5c354fd18732e31d6c2b7ed01f8a7
Tree-SHA512: 748860bf542b0da80407b0b15b068b6bb4a519913eec85251439a32e9d40ccec0af13edfd21ef4ab42f43d26e79e1996c958c9569955bb90f8d9033717aae792