X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/511147de010477fc7808df7fc535a32dd59fae31..3c571d672aa2edbe8afc04cf452ea323eef96f6c:/manual.txt diff --git a/manual.txt b/manual.txt index 424eee6..64afe2a 100644 --- a/manual.txt +++ b/manual.txt @@ -11,9 +11,17 @@ When browsing repositories, tig uses the underlying git commands to present the user with various views, such as summarized commit log and showing the commit with the log message, diffstat, and the diff. +ifndef::backend-docbook[] +*Table of Contents* + +include::manual.toc[] +endif::backend-docbook[] + +[[calling-conventions]] Calling Conventions ------------------- +[[pager-mode]] Pager Mode ~~~~~~~~~~ @@ -27,6 +35,7 @@ Example on how to colorize the output of git-show(1): $ git show | tig ----------------------------------------------------------------------------- +[[cmd-options]] Git Command Options ~~~~~~~~~~~~~~~~~~~ @@ -49,12 +58,14 @@ See the <> section below for an introduction to revision options supported by the git commands. For details on specific git command options, refer to the man page of the command in question. +[[env-variables]] Environment Variables --------------------- Several options related to the interface with git can be configured via environment options. +[[repo-refs]] Repository References ~~~~~~~~~~~~~~~~~~~~~ @@ -109,6 +120,7 @@ TIG_MAIN_CMD:: the option: `--pretty=raw` since the main view parser expects to read that format. +[[viewer]] The Viewer ---------- @@ -127,6 +139,7 @@ You will split the view so that the log view is displayed in the top window and the diff view in the bottom window. You can switch between the two views by pressing 'Tab'. To maximize the log view again, simply press 'l'. +[[commit-id]] Current Head and Commit ID ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -138,6 +151,7 @@ reloaded, if the commit ID changed. The head ID is used when opening the main and log view to indicate from what revision to show history. +[[views]] Views ~~~~~ @@ -159,6 +173,15 @@ The diff view:: has changed since the last commit, or the commit diff complete with log message, diffstat and diff. +The tree view:: + Lists directory trees associated with the current revision allowing + subdirectories to be descended or ascended and file blobs to be + viewed. + +The blob view:: + Displays the file content or "blob" of data associated with a file + name. + The pager view:: Is used for displaying both input from stdin and output from git commands entered in the internal prompt. @@ -166,6 +189,7 @@ The pager view:: The help view:: Displays key binding quick reference. +[[title-window]] Title Windows ~~~~~~~~~~~~~ @@ -184,95 +208,110 @@ be appended: [main] 77d9e40fbcea3238015aea403e06f61542df9a31 - commit 1 of 779 (0%) 5s ----------------------------------------------------------------------------- -Keys ----- +[[keys]] +Default Keybindings +------------------- Below the default key bindings are shown. +[[view-switching]] View Switching ~~~~~~~~~~~~~~ -m:: - Switch to main view. -d:: - Switch to diff view. -l:: - Switch to log view. -p:: - Switch to pager view. -h, ?:: - Show man page. +`-------`-------------------------------------------------------------------- +Key Action +----------------------------------------------------------------------------- +m Switch to main view. +d Switch to diff view. +l Switch to log view. +p Switch to pager view. +t Switch to (directory) tree view. +f Switch to (file) blob view. +h Show man page. +----------------------------------------------------------------------------- + +[[view-manipulation]] View Manipulation ~~~~~~~~~~~~~~~~~ -q:: - Close view, if multiple views are open it will jump back to the - previous view in the view stack. If it is the last open view it + +`-------`-------------------------------------------------------------------- +Key Action +----------------------------------------------------------------------------- +q Close view, if multiple views are open it will jump back to the \ + previous view in the view stack. If it is the last open view it \ will quit. Use 'Q' to quit all views at once. -Enter:: - This key is "context sensitive" depending on what view you are - currently in. When in log view on a commit line or in the main - view, split the view and show the commit diff. In the diff view +Enter This key is "context sensitive" depending on what view you are \ + currently in. When in log view on a commit line or in the main \ + view, split the view and show the commit diff. In the diff view \ pressing Enter will simply scroll the view one line down. -Tab:: - Switch to next view. -Up:: - This key is "context sensitive" and will move the cursor one - line up. However, uf you opened a diff view from the main view - (split- or full-screen) it will change the cursor to point to - the previous commit in the main view and update the diff view +Tab Switch to next view. +Up This key is "context sensitive" and will move the cursor one \ + line up. However, uf you opened a diff view from the main view \ + (split- or full-screen) it will change the cursor to point to \ + the previous commit in the main view and update the diff view \ to display it. -Down:: - Similar to 'Up' but will move down. +Down Similar to 'Up' but will move down. +----------------------------------------------------------------------------- +[[cursor-nav]] Cursor Navigation ~~~~~~~~~~~~~~~~~ -j:: - Move cursor one line up. -k:: - Move cursor one line down. -PgUp:: -b:: --:: - Move cursor one page up. -PgDown:: -Space:: - Move cursor one page down. -Home:: - Jump to first line. -End:: - Jump to last line. +`-------`-------------------------------------------------------------------- +Key Action +----------------------------------------------------------------------------- +j Move cursor one line up. +k Move cursor one line down. +PgUp,\ +-,a Move cursor one page up. +PgDown Space Move cursor one page down. +Home Jump to first line. +End Jump to last line. +----------------------------------------------------------------------------- + +[[view-scrolling]] Scrolling ~~~~~~~~~ -Insert:: - Scroll view one line up. -Delete:: - Scroll view one line down. -w:: - Scroll view one page up. -s:: - Scroll view one page down. +`-------`-------------------------------------------------------------------- +Key Action +----------------------------------------------------------------------------- +Insert Scroll view one line up. +Delete Scroll view one line down. +w Scroll view one page up. +s Scroll view one page down. +----------------------------------------------------------------------------- + +[[searching]] +Searching +~~~~~~~~~ + +`-------`-------------------------------------------------------------------- +Key Action +----------------------------------------------------------------------------- +/ Search the view. Opens a prompt for entering search regex to use. +? Search backwards in the view. Also prompts for regex. +n Find next match for the current search regex. +N Find previous match for the current search regex. +----------------------------------------------------------------------------- + +[[misc-keys]] Misc ~~~~ -Q:: - Quit. -r:: - Redraw screen. -z:: - Stop all background loading. This can be useful if you use - tig in a repository with a long history without limiting + +`-------`-------------------------------------------------------------------- +Key Action +----------------------------------------------------------------------------- +Q Quit. +r Redraw screen. +z Stop all background loading. This can be useful if you use \ + tig in a repository with a long history without limiting \ the revision log. -v:: - Show version. -n:: - Toggle line numbers on/off. -g:: - Toggle revision graph visualization on/off. -':':: - Open prompt. This allows you to specify what git command - to run. Example: - - :log -p +v Show version. +'.' Toggle line numbers on/off. +g Toggle revision graph visualization on/off. +':' Open prompt. This allows you to specify what git command \ + to run. Example `:log -p` +----------------------------------------------------------------------------- [[refspec]] Revision Specification @@ -288,6 +327,7 @@ You can tune the interaction with git by making use of the options explained in this section. For example, by configuring the environment variables described in the <> section. +[[path-limiting]] Limit by Path Name ~~~~~~~~~~~~~~~~~~ @@ -311,6 +351,7 @@ NOTE: For the main view, avoiding ambiguity will in some cases require you to specify two "\--" options. The first will make tig stop option processing and the latter will be passed to git log. +[[date-number-limiting]] Limit by Date or Number ~~~~~~~~~~~~~~~~~~~~~~~ @@ -328,6 +369,7 @@ $ tig -- --after="May 5th" --before="2006-05-16 15:44" NOTE: If you want to avoid having to quote dates containing spaces you can use "." instead, e.g. `--after=May.5th`. +[[commit-range-limiting]] Limiting by Commit Ranges ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -349,6 +391,7 @@ $ tig log origin..HEAD will list what will be pushed to the remote branch. Optionally, the ending 'HEAD' can be left out since it is implied. +[[reachability-limiting]] Limiting by Reachability ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -367,6 +410,7 @@ $ tig log tag-2.0 ^tag-1.0 You can think of '^' as a negation operator. Using this alternate syntax, it is possible to further prune commits by specifying multiple branch cut offs. +[[refspec-combi]] Combining Revisions Specification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -378,6 +422,7 @@ under the Documentation/ directory." $ tig -- --since=1.month -n20 -- Documentation/ ----------------------------------------------------------------------------- +[[refspec-all]] Examining All Repository References ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -392,6 +437,7 @@ $ tig -- --all --since=1.week -- Makefile include::BUGS[] +[[copy-right]] Copyright --------- @@ -402,6 +448,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. +[[references]] References and Related Tools ----------------------------