Mise à jour Help
This commit is contained in:
parent
f16cb1bed2
commit
9222ffea90
@ -32,12 +32,12 @@ public class Exec {
|
|||||||
CommandLine cmd = new CommandLine(new Evaluate());
|
CommandLine cmd = new CommandLine(new Evaluate());
|
||||||
cmd.execute(args);
|
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());
|
CommandLine cmd = new CommandLine(new Help());
|
||||||
cmd.execute(args);
|
cmd.execute(args);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
System.out.println(args[0] + " : command not found");
|
System.err.println("NGCC: "+args[0] + " : command not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import picocli.CommandLine.*;
|
|||||||
" _______ _________________ ________ \n" +
|
" _______ _________________ ________ \n" +
|
||||||
" \\ \\ / _____/\\_ ___ \\\\_ ___ \\ \n" +
|
" \\ \\ / _____/\\_ ___ \\\\_ ___ \\ \n" +
|
||||||
" / | \\/ \\ ___/ \\ \\// \\ \\/ \n" +
|
" / | \\/ \\ ___/ \\ \\// \\ \\/ \n" +
|
||||||
" / | \\ \\_\\ \\ \\___\\ \\__ \n" +
|
" / | \\ \\_ \\ \\ \\___\\ \\___ \n" +
|
||||||
" \\____|__ /\\______ /\\______ /\\______ / \n" +
|
" \\____|__ /\\______ /\\______ /\\______ / \n" +
|
||||||
" \\/ \\/ \\/ \\/ \n" +
|
" \\/ \\/ \\/ \\/ \n" +
|
||||||
" \n" ,
|
" \n" ,
|
||||||
@ -25,15 +25,21 @@ import picocli.CommandLine.*;
|
|||||||
|
|
||||||
public class Help implements Callable <Void> {
|
public class Help implements Callable <Void> {
|
||||||
|
|
||||||
@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;
|
boolean help;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Void call() throws Exception {
|
public Void call() throws Exception {
|
||||||
if(help) {
|
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" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user