pgbackrest icon indicating copy to clipboard operation
pgbackrest copied to clipboard

Support --version and --help

Open turnstep opened this issue 4 years ago • 2 comments

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.

turnstep avatar Jul 26 '21 20:07 turnstep

Added a test!

turnstep avatar Jul 27 '21 14:07 turnstep

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.

dwsteele avatar Jul 29 '21 12:07 dwsteele

Closing since PR #2263 implements this.

dwsteele avatar Jan 18 '24 19:01 dwsteele