pgbackrest
pgbackrest copied to clipboard
Support --version and --help
I find myself typing pgbackrest --version and pgbackrest --help more often than I want to admit.
I made a quick branch to address this problem at https://github.com/turnstep/pgbackrest/tree/greg/dash-dash-version
Will make it a PR on request.
Added a test!
This seems like a good idea but I'm not sure auto-transforming options into commands is a good idea. It leads to some surprising behaviors, e.g.:
$ test/bin/none/pgbackrest --version --help
ERROR: [096]: command does not allow parameters
Also, it means we can't have a parameter named version. Maybe that's OK, though.
I think the way to go about this would be to make the implicit none command accept these two options. This would require some modifications in src/build/config and /src/config.
Closing since PR #2263 implements this.