Skip to content

Commit aac16d0

Browse files
committed
Show help when osm2pgsql is started without any arguments
1 parent 040feed commit aac16d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/options.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,13 @@ static osmium::Box parse_bbox(char const *bbox)
345345

346346
options_t::options_t(int argc, char *argv[]) : options_t()
347347
{
348+
// If there are no command line arguments at all, show help.
349+
if (argc == 1) {
350+
long_usage_bool = true;
351+
long_usage(argv[0], false);
352+
return;
353+
}
354+
348355
bool help_verbose = false; // Will be set when -v/--verbose is set
349356

350357
int c;

0 commit comments

Comments
 (0)