From 8b3802d9b8487d9d19fcdbd09f24e9b107f11c79 Mon Sep 17 00:00:00 2001 From: Henrixounez Date: Wed, 26 Jun 2019 17:40:04 +0200 Subject: [PATCH] help: cleaner help informations help: added repl informations --- compiler/main.v | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/compiler/main.v b/compiler/main.v index b09e2e828f..3a41348ec2 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -131,7 +131,7 @@ fn main() { return } // V with no args? REPL - if args.len < 2 { + if args.len < 2 || (args.len == 2 && args[1] == '-') { run_repl() return } @@ -885,26 +885,19 @@ fn run_repl() []string { // This definitely needs to be better :) const ( HelpText = ' -- Build a V program: -v file.v +Usage: v [options] [file | directory] -- Get current V version: -v version - -- Build an optimized executable: -v -prod file.v - -- Specify the executable\'s name: -v -o program file.v - -- Build and execute a V program: -v run file.v - -- Obfuscate the resulting binary: -v -obf -prod build file.v - -- Test: -v string_test.v +Options: + - Read from stdin (Default; Interactive mode if in a tty) + -h, --help, help Display this information. + -v, version Display compiler version. + -prod Build an optimized executable. + -o Place output into . + -obf Obfuscate the resulting binary. + run Build and execute a V program. + You can add arguments after file name. +Files: + _test.v Test file. ' )