chiark
/
gitweb
/
~mdw
/
tig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
49f2b43
)
Improve documentation
author
Jonas Fonseca
<fonseca@diku.dk>
Thu, 11 May 2006 00:59:27 +0000
(
02:59
+0200)
committer
Jonas Fonseca
<fonseca@antimatter.localdomain>
Thu, 11 May 2006 00:59:27 +0000
(
02:59
+0200)
tig.c
patch
|
blob
|
blame
|
history
diff --git
a/tig.c
b/tig.c
index 90e9e5f022a79abe0cd250ba423891201a1798dc..dea3a840278ee094c2c46bac8079e7523dcb50ed 100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-259,10
+259,10
@@
parse_options(int argc, char *argv[])
/**
* \--::
/**
* \--::
- * End of tig options. Useful when specifying commands
+ * End of tig
(1)
options. Useful when specifying commands
* for the main view. Example:
*
* for the main view. Example:
*
- * $ tig -- --
pretty=raw tag-1.0..HEAD
+ * $ tig -- --
since=1.month
**/
if (!strcmp(opt, "--")) {
i++;
**/
if (!strcmp(opt, "--")) {
i++;
@@
-270,7
+270,7
@@
parse_options(int argc, char *argv[])
}
/* Make stuff like:
}
/* Make stuff like:
-
*
+ *
* $ tig tag-1.0..HEAD
*
* work.
* $ tig tag-1.0..HEAD
*
* work.
@@
-281,9
+281,18
@@
parse_options(int argc, char *argv[])
die("unknown command '%s'", opt);
}
die("unknown command '%s'", opt);
}
+ /**
+ * Pager mode
+ * ~~~~~~~~~~
+ * If stdin is a pipe, any log or diff options will be ignored and the
+ * pager view will be opened loading data from stdin. The pager mode
+ * can be used for colorizing output from various git commands.
+ *
+ * Example on how to colorize the output of git-show(1):
+ *
+ * $ git show | tig
+ **/
if (!isatty(STDIN_FILENO)) {
if (!isatty(STDIN_FILENO)) {
- /* XXX: When pager mode has been requested, silently override
- * view startup options. */
opt_request = REQ_VIEW_PAGER;
opt_pipe = stdin;
opt_request = REQ_VIEW_PAGER;
opt_pipe = stdin;