diff --git a/src/clic-subcommand-instance.adb b/src/clic-subcommand-instance.adb index 6646c2b..5b0bcd7 100644 --- a/src/clic-subcommand-instance.adb +++ b/src/clic-subcommand-instance.adb @@ -444,7 +444,9 @@ package body CLIC.Subcommand.Instance is Display_Options (Config, "OPTIONS"); - Display_Global_Options; + if Global_Options_In_subcommand_help then + Display_Global_Options; + end if; -- Format and print the long command description Put_Line (""); diff --git a/src/clic-subcommand-instance.ads b/src/clic-subcommand-instance.ads index 1bf03cc..1c559d9 100644 --- a/src/clic-subcommand-instance.ads +++ b/src/clic-subcommand-instance.ads @@ -28,6 +28,10 @@ generic with function TTY_Underline (Str : String) return String; with function TTY_Emph (Str : String) return String; + Global_Options_In_subcommand_help : Boolean := True; + -- When listing help for a subcommand, also include a section on global + -- options (that apply to all subcommands). + package CLIC.Subcommand.Instance is procedure Register (Cmd : not null Command_Access);