From b3f1c22644d7fa23c2af1b179a79c8494ff44888 Mon Sep 17 00:00:00 2001 From: otya128 Date: Sat, 3 Dec 2016 21:17:52 +0900 Subject: [PATCH] add --help -h --- .travis.yml | 7 ++----- SMILEBASIC/main.d | 6 ++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0bc81e3..e7586ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,6 @@ d: - dmd - gdc - ldc -addons: - apt: - packages: - - libsdl2-2.0-0 - - libsdl2-image-2.0-0 +dub test --compiler=${DC} -- -h + diff --git a/SMILEBASIC/main.d b/SMILEBASIC/main.d index ea57f8f..5cbbb5b 100644 --- a/SMILEBASIC/main.d +++ b/SMILEBASIC/main.d @@ -12,6 +12,12 @@ int main(string[] argv) bool nodirectmode; string inputfile; auto helpInformation = getopt(argv, "no-direct-mode", &nodirectmode, "file", &inputfile); + if (helpInformation.helpWanted) + { + defaultGetoptPrinter("Some information about the program.", + helpInformation.options); + return 0; + } //try { auto pc = new PetitComputer();