Update help text and add yait.1
This commit is contained in:
1
TODO
1
TODO
@@ -5,7 +5,6 @@ Todo:
|
||||
* Polish for 1.0
|
||||
* Implement the extra options
|
||||
* Document the extra options
|
||||
* Update usage text to work with help2man
|
||||
* Add build target for man.
|
||||
* Refactor to more GNU style main
|
||||
* Look into conf file
|
||||
|
||||
42
src/main.c
42
src/main.c
@@ -33,25 +33,29 @@ static void usage(int status)
|
||||
return;
|
||||
}
|
||||
|
||||
puts("Usage: yait [OPTION]... <PATH>");
|
||||
puts("Creates a C project with opinionated defaults");
|
||||
puts("When only given the first argument it will detect your name\n");
|
||||
puts("Mandatory arguments to long options are mandatory for short options too");
|
||||
print_option("--git", "Initialize git repository (default)");
|
||||
print_option("--no-git", "Do not initialize git repository");
|
||||
print_option("--lib", "Make this a library");
|
||||
print_option("-l <licence>",
|
||||
"Set licence. This list can be found by passing 'list'");
|
||||
print_option("-E", "Open $EDITOR after project creation");
|
||||
print_option("--autotools", "Use the autotools build system");
|
||||
print_option("--cmake", "Use the cmake build system");
|
||||
print_option("--make", "Use the GNU make build system (default)");
|
||||
print_option("--bare", "Minimal C project structure");
|
||||
print_option("--flat", "All files in project root.");
|
||||
print_option("--extras=<arg1>,<arg2>",
|
||||
"Extra build options, Pass list to list out options.");
|
||||
puts(" --help display this help text and exit");
|
||||
puts(" --version output version information and exit");
|
||||
printf("Usage: %s [OPTION]... [project-name]\n", PROGRAM);
|
||||
fputs("\
|
||||
Generates an optionated C project.\n",
|
||||
stdout);
|
||||
puts("");
|
||||
fputs("\
|
||||
--help display this help and exit\n\
|
||||
--version display version information and eixt\n",
|
||||
stdout);
|
||||
puts("");
|
||||
fputs("\
|
||||
--git Initialize git repository (default)\n\
|
||||
--no-git Do not initialize git repository\n\
|
||||
--lib Make this a library\n\
|
||||
-l <licence> Set licence. This list can be found by passing 'list'\n\
|
||||
-E Open $EDITOR after project creation\n\
|
||||
--autotools Use the autotools build system\n\
|
||||
--cmake Use the cmake build system\n\
|
||||
--make Use the GNU make build system (default)\n\
|
||||
--bare Minimal C project structure\n\
|
||||
--flat All files in project root.\n\
|
||||
--extras=<arg1>,<arg2> Extra build options, Pass list to list out options.\n",
|
||||
stdout);
|
||||
}
|
||||
|
||||
void print_lines(const char *first, ...)
|
||||
|
||||
66
yait.1
Normal file
66
yait.1
Normal file
@@ -0,0 +1,66 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||
.TH YAIT "1" "September 2025" "yait beta 156" "User Commands"
|
||||
.SH NAME
|
||||
yait \- manual page for yait beta 156
|
||||
.SH SYNOPSIS
|
||||
.B yait
|
||||
[\fI\,OPTION\/\fR]... [\fI\,project-name\/\fR]
|
||||
.SH DESCRIPTION
|
||||
Generates an optionated C project.
|
||||
.TP
|
||||
\fB\-\-help\fR
|
||||
display this help and exit
|
||||
.TP
|
||||
\fB\-\-version\fR
|
||||
display version information and eixt
|
||||
.TP
|
||||
\fB\-\-git\fR
|
||||
Initialize git repository (default)
|
||||
.TP
|
||||
\fB\-\-no\-git\fR
|
||||
Do not initialize git repository
|
||||
.TP
|
||||
\fB\-\-lib\fR
|
||||
Make this a library
|
||||
.TP
|
||||
\fB\-l\fR <licence>
|
||||
Set licence. This list can be found by passing 'list'
|
||||
.TP
|
||||
\fB\-E\fR
|
||||
Open $EDITOR after project creation
|
||||
.TP
|
||||
\fB\-\-autotools\fR
|
||||
Use the autotools build system
|
||||
.TP
|
||||
\fB\-\-cmake\fR
|
||||
Use the cmake build system
|
||||
.TP
|
||||
\fB\-\-make\fR
|
||||
Use the GNU make build system (default)
|
||||
.TP
|
||||
\fB\-\-bare\fR
|
||||
Minimal C project structure
|
||||
.TP
|
||||
\fB\-\-flat\fR
|
||||
All files in project root.
|
||||
.TP
|
||||
\fB\-\-extras=\fR<arg1>,<arg2>
|
||||
Extra build options, Pass list to list out options.
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2025 GCK.
|
||||
License BSD\-3\-Clause: BSD\-3\-Clause <https://opensource.org/license/bsd\-3\-clause>
|
||||
.br
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRNTY, to the extent permitted by law.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B yait
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B yait
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info yait
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
Reference in New Issue
Block a user