diff --git a/NGCC/src/Exec.java b/NGCC/src/Exec.java index 76dd5c4..e03aefd 100644 --- a/NGCC/src/Exec.java +++ b/NGCC/src/Exec.java @@ -32,12 +32,12 @@ public class Exec { CommandLine cmd = new CommandLine(new Evaluate()); cmd.execute(args); - } else if (args[0].contentEquals("--help")) { + } else if (args[0].contentEquals("help") || args[0].contentEquals("--help")) { CommandLine cmd = new CommandLine(new Help()); cmd.execute(args); } else { - System.out.println(args[0] + " : command not found"); + System.err.println("NGCC: "+args[0] + " : command not found"); } diff --git a/NGCC/src/commands/Help.java b/NGCC/src/commands/Help.java index 0b7d962..068ada4 100644 --- a/NGCC/src/commands/Help.java +++ b/NGCC/src/commands/Help.java @@ -14,7 +14,7 @@ import picocli.CommandLine.*; " _______ _________________ ________ \n" + " \\ \\ / _____/\\_ ___ \\\\_ ___ \\ \n" + " / | \\/ \\ ___/ \\ \\// \\ \\/ \n" + - " / | \\ \\_\\ \\ \\___\\ \\__ \n" + + " / | \\ \\_ \\ \\ \\___\\ \\___ \n" + " \\____|__ /\\______ /\\______ /\\______ / \n" + " \\/ \\/ \\/ \\/ \n" + " \n" , @@ -25,16 +25,22 @@ import picocli.CommandLine.*; public class Help implements Callable { - @Option(names= {"--help"}, required = true, arity = "0", order = 1, description = "help") + @Option(names= {"help", "--help"}, required = true, arity = "0", order = 1, description = "help") boolean help; @Override public Void call() throws Exception { if(help) { - System.out.println("Commands List : -b, -r, -g, -p, -a, -e"); - - + System.out.println( + "\nCommands List : \n\n" + + "-b, --build build mode \n" + + "-r, --read read mode \n" + + "-g, --generate generate mode \n" + + "-p, --produce produce mode \n" + + "-a, --analyse analyse mode \n" + + "-e, --evaluate evaluate mode \n" ); + } return null;