summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0df811c)
raw | patch | inline | side by side (parent: 0df811c)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 20 May 2006 02:45:22 +0000 (04:45 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Sat, 20 May 2006 02:55:40 +0000 (04:55 +0200) |
tig.c | patch | blob | history |
index bf2d6ecdf62ad95a13f7696c93c06fc3d8820174..00791a7777fcf0c250b90960eb1171f3f970d899 100644 (file)
--- a/tig.c
+++ b/tig.c
* -------
**/
+static const char usage[] =
+VERSION " (" __DATE__ ")\n"
+"\n"
+"Usage: tig [options]\n"
+" or: tig [options] [--] [git log options]\n"
+" or: tig [options] log [git log options]\n"
+" or: tig [options] diff [git diff options]\n"
+" or: tig [options] show [git show options]\n"
+" or: tig [options] < [git command output]\n"
+"\n"
+"Options:\n"
+" -l Start up in log view\n"
+" -d Start up in diff view\n"
+" -n[I], --line-number[=I] Show line numbers with given interval\n"
+" -t[N], --tab-size[=N] Set number of spaces for tab expansion\n"
+" -- Mark end of tig options\n"
+" -v, --version Show version and exit\n"
+" -h, --help Show help message and exit\n";
+
/* Option and state variables. */
static bool opt_line_number = FALSE;
static int opt_num_interval = NUMBER_INTERVAL;
return FALSE;
}
+ /**
+ * -h, --help::
+ * Show help message and exit.
+ **/
+ if (!strcmp(opt, "-h") ||
+ !strcmp(opt, "--help")) {
+ printf(usage);
+ return FALSE;
+ }
+
/**
* \--::
* End of tig(1) options. Useful when specifying command