mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
help: cleaner help informations
help: added repl informations
This commit is contained in:
parent
b1183dfe2c
commit
8b3802d9b8
@ -131,7 +131,7 @@ fn main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// V with no args? REPL
|
// V with no args? REPL
|
||||||
if args.len < 2 {
|
if args.len < 2 || (args.len == 2 && args[1] == '-') {
|
||||||
run_repl()
|
run_repl()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -885,26 +885,19 @@ fn run_repl() []string {
|
|||||||
// This definitely needs to be better :)
|
// This definitely needs to be better :)
|
||||||
const (
|
const (
|
||||||
HelpText = '
|
HelpText = '
|
||||||
- Build a V program:
|
Usage: v [options] [file | directory]
|
||||||
v file.v
|
|
||||||
|
|
||||||
- Get current V version:
|
Options:
|
||||||
v version
|
- Read from stdin (Default; Interactive mode if in a tty)
|
||||||
|
-h, --help, help Display this information.
|
||||||
- Build an optimized executable:
|
-v, version Display compiler version.
|
||||||
v -prod file.v
|
-prod Build an optimized executable.
|
||||||
|
-o <file> Place output into <file>.
|
||||||
- Specify the executable\'s name:
|
-obf Obfuscate the resulting binary.
|
||||||
v -o program file.v
|
run Build and execute a V program.
|
||||||
|
You can add arguments after file name.
|
||||||
- Build and execute a V program:
|
Files:
|
||||||
v run file.v
|
<file>_test.v Test file.
|
||||||
|
|
||||||
- Obfuscate the resulting binary:
|
|
||||||
v -obf -prod build file.v
|
|
||||||
|
|
||||||
- Test:
|
|
||||||
v string_test.v
|
|
||||||
'
|
'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user