+/**
+ * [[history-commands]]
+ * History commands
+ * ~~~~~~~~~~~~~~~~
+ * It is possible to alter which commands are used for the different views.
+ * If for example you prefer commits in the main view to be sorted by date
+ * and only show 500 commits, use:
+ *
+ * $ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig
+ *
+ * Or set the variable permanently in your environment.
+ *
+ * Notice, how `%s` is used to specify the commit reference. There can
+ * be a maximum of 5 `%s` ref specifications.
+ *
+ * TIG_DIFF_CMD::
+ * The command used for the diff view. By default, git show is used
+ * as a backend.
+ *
+ * TIG_LOG_CMD::
+ * The command used for the log view. If you prefer to have both
+ * author and committer shown in the log view be sure to pass
+ * `--pretty=fuller` to git log.
+ *
+ * TIG_MAIN_CMD::
+ * The command used for the main view. Note, you must always specify
+ * the option: `--pretty=raw` since the main view parser expects to
+ * read that format.
+ **/
+
+#define TIG_DIFF_CMD \
+ "git show --patch-with-stat --find-copies-harder -B -C %s"
+
+#define TIG_LOG_CMD \
+ "git log --cc --stat -n100 %s"
+
+#define TIG_MAIN_CMD \
+ "git log --topo-order --stat --pretty=raw %s"
+
+/* ... silently ignore that the following are also exported. */
+
+#define TIG_HELP_CMD \
+ "man tig 2>/dev/null"
+
+#define TIG_PAGER_CMD \
+ ""
+
+
+/**
+ * FILES
+ * -----
+ * '~/.tig'::
+ * User configuration file. See "<<config-options, Configuration options>>"
+ * section for examples.
+ *
+ * '.git/config'::
+ * Repository config file. Read on startup with the help of
+ * git-repo-config(1).
+ **/
+/**
+ * [[config-options]]
+ * User Configuration file
+ * -----------------------
+ * You can permanently set an option by putting it in the `~/.tig` file.
+ * The file consists of a series of 'commands'. Each
+ * line of the file may contain only one command.
+ *
+ * The hash mark ('#'), or semi-colon (';') is used as a 'comment' character.
+ * All text after the comment character to the end of the line is ignored.
+ * You can use comments to annotate your initialization file.
+ *
+ * Some sample options:
+ *
+ * ==========================================================================
+ * # Diff colors
+ * color diff-header yellow default
+ * color diff-index blue default
+ * color diff-chunk magenta default
+ * # UI colors
+ * color title-blur white blue
+ * color title-focus white blue bold
+ * ==========================================================================
+ *
+ * [[color-options]]
+ * Color options
+ * ~~~~~~~~~~~~~
+ * Color options control highlighting and the user interface styles.
+ * If your terminal supports color, these commands can be used to assign
+ * foreground/backgound combinations to certain areas. Optionally, an
+ * attribute can be given as the last parameter. The syntax is:
+ *
+ * [verse]
+ * ..........................................................................
+ * *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
+ * ..........................................................................
+ *
+ * Valid colors include: *white*, *black*, *green*, *magenta*, *blue*, *cyan*,
+ * *yellow*, *red*, *default*. Use *default* to refer to the default terminal
+ * colors.
+ **/
+
+static struct int_map color_map[] = {
+#define COLOR_MAP(name) { #name, STRING_SIZE(#name), COLOR_##name }
+ COLOR_MAP(DEFAULT),
+ COLOR_MAP(BLACK),
+ COLOR_MAP(BLUE),
+ COLOR_MAP(CYAN),
+ COLOR_MAP(GREEN),
+ COLOR_MAP(MAGENTA),
+ COLOR_MAP(RED),
+ COLOR_MAP(WHITE),
+ COLOR_MAP(YELLOW),
+};
+
+/**
+ * Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*, *standout*,
+ * and *underline*. Note, not all attributes may be supported by the terminal.
+ **/
+
+static struct int_map attr_map[] = {
+#define ATTR_MAP(name) { #name, STRING_SIZE(#name), A_##name }
+ ATTR_MAP(NORMAL),
+ ATTR_MAP(BLINK),
+ ATTR_MAP(BOLD),
+ ATTR_MAP(DIM),
+ ATTR_MAP(REVERSE),
+ ATTR_MAP(STANDOUT),
+ ATTR_MAP(UNDERLINE),
+};
+
+/**
+ * Valid area names are described below. Note, all names are case-insensitive,
+ * and you may use '-', '_', and '.' interchangeably. So "Diff-Header",
+ * "DIFF_HEADER", and "diff.header" are the same.
+ *
+ * --
+ **/