From 755077c39a0dc63f07e30564df4a3121d7079da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 30 Jul 2024 19:19:25 +0200 Subject: List available commands in help text --- src/Command.hs | 1 + src/Command/Run.hs | 1 + src/Main.hs | 15 +++++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Command.hs b/src/Command.hs index ae24534..0ca6710 100644 --- a/src/Command.hs +++ b/src/Command.hs @@ -19,6 +19,7 @@ import Config class CommandArgumentsType (CommandArguments c) => Command c where commandName :: proxy c -> String + commandDescription :: proxy c -> String type CommandOptions c :: Type type CommandOptions c = () diff --git a/src/Command/Run.hs b/src/Command/Run.hs index 677f8f1..daba8af 100644 --- a/src/Command/Run.hs +++ b/src/Command/Run.hs @@ -24,6 +24,7 @@ data RunCommand = RunCommand Text instance Command RunCommand where commandName _ = "run" + commandDescription _ = "Execude jobs per minici.yaml for given commits" type CommandArguments RunCommand = Maybe Text diff --git a/src/Main.hs b/src/Main.hs index 7dcc484..cdce0f9 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -61,8 +61,19 @@ main = do exitFailure when (optShowHelp opts) $ do - let header = "Usage: minici [