diff --git a/src/sh_edraft/cli/cpl_cli/cli.py b/src/sh_edraft/cli/cpl_cli/cli.py index d74f807b..ae63de86 100644 --- a/src/sh_edraft/cli/cpl_cli/cli.py +++ b/src/sh_edraft/cli/cpl_cli/cli.py @@ -25,6 +25,7 @@ class CLI: except Exception as e: tb = traceback.format_exc() Console.error(str(e), tb) + Console.error('Run \'cpl help\'') def main(): diff --git a/src/sh_edraft/cli/cpl_cli/commands/new.py b/src/sh_edraft/cli/cpl_cli/commands/new.py index c9d63353..90ebb690 100644 --- a/src/sh_edraft/cli/cpl_cli/commands/new.py +++ b/src/sh_edraft/cli/cpl_cli/commands/new.py @@ -13,19 +13,23 @@ class New(CommandBase): rel_path = f'{os.path.dirname(__file__)}/../' if len(args) == 0: Console.error(f'Expected arguments {args}') + Console.error('Run \'cpl help\'') return elif len(args) != 2: Console.error(f'Invalid arguments {args}') + Console.error('Run \'cpl help\'') return if not os.path.isdir(f'{rel_path}/templates/{args[0]}'): Console.error(f'Unexpected argument {args[0]}') + Console.error('Run \'cpl help\'') sub_args = args[1:] if len(sub_args) != 1: Console.error(f'Unexpected argument {sub_args[1]}') + Console.error('Run \'cpl help\'') if not (sub_args[0].startswith('.') or sub_args[0].startswith('/')): full_path = f'./{sub_args[0]}' diff --git a/src/sh_edraft/cli/interpreter/interpreter.py b/src/sh_edraft/cli/interpreter/interpreter.py index 5a7f38d8..577989d8 100644 --- a/src/sh_edraft/cli/interpreter/interpreter.py +++ b/src/sh_edraft/cli/interpreter/interpreter.py @@ -24,5 +24,7 @@ class Interpreter: cmd.run(args) else: Console.error(f'Unexpected command {command}') + Console.error('Run \'cpl help\'') else: Console.error(f'Unexpected command {command}') + Console.error('Run \'cpl help\'')