@@ -10,13 +10,13 @@ void print_help() {
10
10
printf ("Nature Programming Language Compiler %s\n\n" , BUILD_VERSION );
11
11
printf ("Usage:\n" );
12
12
printf (" nature [command] [flags] [arguments]\n\n" );
13
-
13
+
14
14
printf ("Available Commands:\n" );
15
15
printf (" build Build a Nature source file\n\n" );
16
-
16
+
17
17
printf ("Build Command Usage:\n" );
18
18
printf (" nature build [flags] <source_file>\n\n" );
19
-
19
+
20
20
printf ("Build Flags:\n" );
21
21
printf (" -o <name> Specify output filename (default: main)\n" );
22
22
printf (" --archive Generate static library (output: lib<name>.a)\n" );
@@ -26,13 +26,13 @@ void print_help() {
26
26
27
27
printf ("Cross Compilation:\n" );
28
28
printf (" nature build --target <platform> <source_file>\n\n" );
29
-
29
+
30
30
printf (" Supported Platforms:\n" );
31
31
printf (" - linux_amd64 Linux on x86-64 architecture\n" );
32
32
printf (" - linux_arm64 Linux on ARM 64-bit architecture\n" );
33
33
printf (" - darwin_amd64 macOS on x86-64 architecture\n" );
34
34
printf (" - darwin_arm64 macOS on ARM 64-bit architecture (Apple Silicon)\n\n" );
35
-
35
+
36
36
printf ("Examples:\n" );
37
37
printf (" nature build main.n # Basic build\n" );
38
38
printf (" nature build -o test main.n # Custom output name\n" );
@@ -42,7 +42,7 @@ void print_help() {
42
42
43
43
printf ("Global Flags:\n" );
44
44
printf (" --help, -h Show help information\n" );
45
- printf (" --version Show version information\n" );
45
+ printf (" --version, -v Show version information\n" );
46
46
}
47
47
48
48
/**
@@ -63,8 +63,8 @@ int main(int argc, char *argv[]) {
63
63
print_help ();
64
64
return 0 ;
65
65
}
66
-
67
- if (str_equal (first , "--version" )) {
66
+
67
+ if (str_equal (first , "--version" ) || str_equal ( first , "-v" ) ) {
68
68
printf ("nature %s - %s build %s\n" , BUILD_VERSION , BUILD_TYPE , BUILD_TIME );
69
69
return 0 ;
70
70
}
0 commit comments