FNC(1)

NAME
fnc - interactive text-based user interface for Fossil

SYNOPSIS
fnc [command] [-h | --help]
fnc [-h | --help] [-v | --version]
fnc stash [(get|pop) [id] | -ChPx]
fnc config [-hu] [--ls] [-R path] [setting [value]]
fnc timeline [-Chz] [-b branch] [-c commit] [-f glob] [-n number] [-R path] [-T tag] [-t type] [-u user] [path]
fnc diff [-bChilPqsWw] [-R path] [-x number] [artifact1 [artifact2]] [path ...]
fnc tree [-Ch] [-c commit] [-R path] [path]
fnc blame [-Ch] [-c commit [-r]] [-n number] [-R path] path
fnc branch [-Cchopr] [-a date | -b date] [-R path] [-s order] [glob]
fnc [path]

DESCRIPTION
fnc is an interactive text-based user interface for fossil(1) repositories, and supports multiple views to display repository data:

Timeline view
    Display commits from the repository's history in chronologically descending order. If no command or arg are specified, or just a path is passed, fnc will default to displaying this view.

Diff view
    Display changes introduced in the specified commit, or between two repository artifacts.

Tree view
    Display navigable tree reflecting the repository state as at the specified commit.

Blame view
    Display and annotate each line in the given file with the hyperlinked historical commit that last modified the line.

Branch view
    Display navigable list of all repository branches.

fnc provides both global and command-specific options and runtime key bindings. Global options are as follows:

-h, --help
    Display program help and usage information then exit.

-R, --repo path
    Use the fossil(1) repository at the specified path for the current fnc invocation. See command specific options for details.

-v, --version
    Display program version then exit.

Global key bindings are as follows:

H, ?, F1
    Display runtime help.

Tab Switch focus between open views.

f   Toggle the active view between fullscreen and splitscreen mode. By default, fnc will open nested views in a splitscreen if the terminal window is equal to or greater than 110 columns wide.

Q   Quit fnc.

q   Quit the active view.

Commands available to fnc are as follows:

config [-h | --help] [--ls] [-R | --repo path] [setting [value | --unset]]
        (aliases: conf, set)
    Retrieve the current, or set a new, value for setting in the local repository. When specified, value will become the new value for setting, otherwise fnc will display the current value of setting. With no arguments, fnc config will display a list of all configurable settings. Alternatively, see ENVIRONMENT for a detailed list of available settings used in the display or processing of data. When no value is defined for a given setting in the local repository, environment variables will be searched. If still not found, fnc will fallback to default values. Unless the --repo option is used, this command must be invoked from within a work tree; that is, fnc assumes a local checkout is open in or above the current working directory. Options for fnc config are as follows:

    -h, --help
        Display config command help and usage information then exit.

    --ls
        List all currently defined settings.

    -R, --repo path
        Use the fossil(1) repository at the specified path for the current fnc config invocation.

    -u, --unset
        Clear the specified setting.

stash [(get|pop) [id] | [-C | --no-colour] [-h | --help] [-P | --no-prototype] [-x | --context n]]
        (aliases: save, sta)
    When run with neither the get nor pop subcommands, fnc stash will present an interactive view of the local changes on disk and iterate each hunk in the diff, prompting the user to either stash or keep the current change in the checkout. Valid answers are as follows:
    b | scroll back^ m | show more of the current hunk^ y | yes, stash the current hunk n | no, do not stash the current hunk a | yes, stash this hunk and all remaining hunks in the file k | no, do not stash this hunk nor any remaining hunks in the file A | yes, stash this hunk and all remaining hunks in the diff K | no, do not stash this hunk nor any remaining hunks in the diff? | display help dialog

    ^Conditionally available when the current hunk occupies the previous and/or following page.

    When all hunks have been selected, fnc will prompt the user to enter a stash message. If not provided, a default message of " fnc stash HASH-PREFIX ", where "HASH-PREFIX" is an abbreviated SHA hash of the current checkout, will be used. At any time prior to the final hunk being selected (i.e., before the stash message prompt), the operation can be aborted by opening the help dialog and entering "Q". This will discard all selections and leave the checkout state unchanged.

    Available subcommands for fnc stash are as follows:

    get [id]
            (aliases: apply)
        Retrieve stash id, or if not provided the most recent stash entry, and apply it to the current checkout.

    pop [id]
        Remove stash id, or if not provided the most recent stash entry, and apply it to the current checkout.

    Options only apply to fnc stash (i.e., neither the get nor pop subcommands) and are as follows:

    -C, --no-colour
        Disable coloured output, which is enabled by default on supported terminals.

    -h, --help
        Display stash command help and usage information then exit.

    -P, --no-prototype
        Disable hunk header display of which function or scope each change is in, which is enabled by default. The heuristic will produce reliable results for all C-like languages (e.g., C/C++, Java, Python, JavaScript, Rust); however, Lisps and non-source code (e.g., Markdown, reStructuredText) will return meaningless results.

    -x, --context n
        Set n context lines to be shown in the interactive stash diff display such that 0 n 64. By default, 5 context lines are shown. Illegal values are a no-op.

timeline [-C | --no-colour] [-T | --tag tag] [-b | --branch branch] [-c | --commit commit] [-f | --filter glob] [-h | --help] [-n | --limit n] [-R | --repo path] [-t | --type type] [-u | --username user] [-z | --utc] [path]
        (aliases: log, tl)
    Display commit history of a repository. If path is specified, only commits that modified the file(s) at this path will populate the timeline. The path may be absolute, relative to the current working directory, or relative to the repository root. Unless the --repo option is used, this command must be invoked from within a work tree; that is, fnc assumes a local checkout is open in or above the current working directory.

    If no command is explicitly specified, this command will be executed by default.

    Options for fnc timeline are as follows:

    -b, --branch branch
        Display commits that are members of the specified branch. The expected argument is a glob of the symbolic name of a branch, with the most recent branch to match being selected. Pattern matching is case-insensitive unless branch has at least one uppercase character, in which case the search will be case-sensitive. By default, fnc will display all commits irrespective of the branch on which they reside.

    -C, --no-colour
        Disable colourised timeline, which is enabled by default on supported terminals. If this option is not used, colour can be toggled with the c timeline view key binding as documented below. User-defined colours are also supported, see ENVIRONMENT for details.

    -c, --commit commit
        Open the timeline from the check-in identified by commit. The expected argument is either the name of a branch, which will resolve to the latest commit on the given branch, or (a unique abbreviated prefix of) a valid commit SHA1 or SHA3 hash. When this option is not supplied, fnc will open the timeline to the latest leaf on the repository tree. For a complete list of valid arguments this option accepts, see Fossil's Check-in Names: https://fossil-scm.org/home/doc/trunk/www/checkin_names.wiki.

    -f, --filter glob
        Filter timeline by commits containing glob in any of the commit comment, user, or branch fields. Pattern matching is case-insensitive unless glob has at least one uppercase character, in which case the search will be case-sensitive. Filtering can also be performed at runtime with the F timeline view key binding as documented below.

    -h, --help
        Display timeline command help and usage information then exit.

    -n, --limit n
        Limit timeline to the latest n commits. By default, fnc will load the entire history of the repository's local checkout. Negative values are a no-op.

    -R, --repo path
        Use the fossil(1) repository at the specified path for the current fnc timeline invocation. When this option is used, the checkout-related Fossil special tags "current", "prev", and "next" are invalid arguments to the --commit option. When --commit is not specified, fnc will default to populating the timeline from the latest commit.

    -T, --tag tag
        Only display commits with T cards containing tag. The expected argument is a glob of a commit manifest's T card argument, with the most recent tag to match being selected. Pattern matching is case-insensitive unless tag has at least one uppercase character, in which case the search will be case-sensitive. By default, fnc will indiscriminately display all commits irrespective of which T cards are attached to the commit manifest.

    -t, --type type
        Only display type commits. Valid type values are as follows:
        ci | check-in w | wiki t | ticket e | technote f | forum post g | tag artifact

        By default, when this option is not supplied, fnc will indiscriminately load all commits irrespective of type. This is a repeatable flag (e.g., fnc timeline -t e -t t).

    -u, --username user
        Only display commits authored by user. The search is case-insensitive by default unless user contains at least one uppercase character, in which case the search will be case-sensitive.

    -z, --utc
        Use Coordinated Universal Time (UTC) rather than local time when displaying commit dates and timestamps.

    Key bindings for fnc timeline are as follows:

    Arrow-down, j, >,.
        Move selection cursor down the timeline.

    Arrow-up, k, <,,
        Move selection cursor up the timeline.

    Arrow-right, l
        Scroll the view two columns to the right in the buffer. The comment field moves left on the screen.

    Arrow-left, h
        Scroll the view two columns to the left in the buffer. The comment field moves right on the screen.

    $   Scroll the view right to the end of the longest comment summary line on the page.

    0   Scroll the view left to the beginning of the line.

    C-f, Page-down
        Scroll timeline view one page downwards in the buffer.

    C-b, Page-up
        Scroll timeline view one page upwards in the buffer.

    C-d Scroll timeline view half a page downwards in the buffer.

    C-u Scroll timeline view half a page upwards in the buffer.

    G, End
        Move selection cursor to the last commit on the timeline (i.e., oldest commit in the repository).

    gg, Home
        Move selection cursor to the first commit on the timeline (i.e., newest commit in the repository).

    Enter
        Open a diff view displaying the changeset of the currently selected commit.

    Space
        (Un)tag the currently selected commit as the base commit for the next tagged commit to be diffed against. If another commit is already tagged, show the changes between it and the selected commit.

    b   Open and populate branch view with all repository branches.

    C   Diff local changes on disk in the current checkout against the selected commit.

    c   Toggle colourised timeline. On supported terminals, fnc will default to displaying the timeline in colour.

    F   Prompt to enter a search term to filter a new timeline view by commits with comment, user, or branch fields that match the entered pattern. If no commits match, a message is displayed on screen.

    t   Display the tree of the repository corresponding to the currently selected commit.

    /   Prompt to enter a search term to begin searching for commits matching the pattern provided. The search term is an extended regular expression, which is cross-referenced against a commit's comment, the username of its author, branch, and SHA1 or SHA3 hash. See re_format(7) for regular expression syntax.

    n   Find the next commit that matches the current search term. The search will continue until either a match is found or the earliest commit on the timeline is consumed.

    N   Find the previous commit that matches the current search term. The search will continue until either a match is found or the latest commit on the timeline is consumed.

    Backspace
        Cancel the current search or timeline traversal ( i.e., /, G, or End).

diff [-b | --brief] [-C | --no-colour] [-h | --help] [-i | --invert] [-l | --line-numbers] [-P | --no-prototype] [-q | --quiet] [-R | --repo path] [-s | --sbs] [-W | --whitespace-eol] [-w | --whitespace] [-x | --context n] [artifact1 [artifact2]] [path ...]
        (alias: di)
    Display the differences between two repository artifacts, or between the local changes on disk and a given commit. If neither artifact1 nor artifact2 are specified, fnc will diff the local changes on disk against the version on which the current checkout is based. If only artifact1 is specified, fnc will diff the current checkout, including any local changes on disk, against this version. When both arguments are specified, the changes between these two versions will be displayed. If supplied, fnc will filter diffs between commits by path so that only changes involving the file(s) identified are displayed. Paths may be absolute, relative to the current working directory, or relative to the repository root. Both artifact1 and artifact2 must be of the same type, which is expected to be either a symbolic check-in name, tag, (unique abbreviated prefix of) a commit or blob artifact SHA1 or SHA3 hash, or an ISO 8601 formatted date. Both artifact arguments must be supplied when diffing blobs; any following non-option arguments are invalid and will be ignored. Unless the --repo option is used, this command must be invoked from within a work tree; that is, fnc assumes a local checkout is open in or above the current working directory.

    Options for fnc diff are as follows:

    -b, --brief
        Display file index and hash lines only.

    -C, --no-colour
        Disable coloured diff output, which is enabled by default on supported terminals. If this option is not used, colour can be toggled with the c diff view key binding as documented below. User-defined colours are also supported, see ENVIRONMENT for details.

    -h, --help
        Display diff command help and usage information then exit.

    -i, --invert
        Invert the difference between artifacts when displaying the diff.

    -l, --line-numbers
        Display file line numbers in diff output. As documented below, this option can be toggled with the L diff view key binding.

    -P, --no-prototype
        Disable hunk header display of which function or scope each change is in, which is enabled by default. The heuristic will produce reliable results for all C-like languages (e.g., C/C++, Java, Python, JavaScript, Rust); however, Lisps and non-source code (e.g., Markdown, reStructuredText) will return meaningless results. Function prototype cannot be displayed in the hunk header with either -l|-line-numbers or -s|-sbs formatted diffs. This option can be toggled at runtime with the p key binding as documented below.

    -q, --quiet
        Disable verbose output; that is, do not output complete content of newly added or deleted files, which are displayed by default. Verbosity can also be toggled with the v key binding as documented below.

    -R, --repo path
        Use the fossil(1) repository at the specified path for the current fnc diff invocation. When this option is used, both artifact1 and artifact2 are required, and the checkout-related Fossil special tags "current", "prev", and "next" are invalid artifact operands.

    -s, --sbs
        Display a side-by-side formatted diff. As documented below, this option can also be toggled at runtime with the S key binding. (Mutually exclusive with -l, --line-numbers)

    -W, --whitespace-eol
        Ignore end-of-line whitespace-only changes when displaying the diff.

    -w, --whitespace
        Ignore whitespace-only changes when displaying the diff.

    -x, --context n
        Set n context lines to be shown in the diff such that 0 n 64. By default, 5 context lines are shown. Illegal values are a no-op.

    All the above options ( sans -h and -R) can be made persistent as global or per-repo settings. See ENVIRONMENT for details.

    Key bindings for fnc diff are as follows:

    Arrow-down, j
        Move the selection cursor down one line.

    Arrow-up, k
        Move the selection cursor up one line.

    Arrow-right, l
        Scroll the view two columns to the right in the buffer. Diff output moves left on the screen.

    Arrow-left, h
        Scroll the view two columns to the left in the buffer. Diff output moves right on the screen.

    $   Scroll the view right to the end of the longest line in the diff.

    0   Scroll the view left to the beginning of the line.

    C-e Scroll view one line downwards in the buffer. Diff output moves upwards on the screen.

    C-y Scroll view one line upwards in the buffer. Diff output moves downwards on the screen.

    C-f, Page-down, Space
        Scroll diff view one page downwards in the buffer.

    C-b, Page-up
        Scroll diff view one page upwards in the buffer.

    C-d Scroll diff view half a page downwards in the buffer.

    C-u Scroll diff view half a page upwards in the buffer.

    G, End
        Scroll to the end of the view (i.e., last line of diff output).

    gg, Home
        Scroll to the top of the view (i.e., first line of diff output).

    C-k, K, <,,
        If the diff is derived from a timeline view, move up the timeline to the previous (i.e., newer) commit and display its diff. If the diff is derived from a blame view, display the commit diff of the previous line in the annotated file.

    C-j, J, >,.
        If the diff is derived from a timeline view, move down the timeline to the next (i.e., older) commit and display its diff. If the diff is derived from a blame view, display the commit diff of the next line in the annotated file.

    C-p Navigate to previous file in the diff.

    C-n Navigate to next file in the diff.

    [   Navigate to previous hunk in the diff.

    ]   Navigate to next hunk in the diff.

    -, _
        Decrease the number of context lines shown in diff output.

    =, +
        Increase the number of context lines shown in diff output.

    #   Toggle display of diff view line numbers.

    @   Open prompt to enter line number and navigate to that line in the view.

    b   Toggle brief diff mode by only displaying file index and hash lines.

    B   Open and populate branch view with all repository branches.

    c   Toggle coloured diff output. On supported terminals, fnc will default to displaying changes and diff metadata in colour.

    F   Open prompt to enter file number and navigate to that file in the diff.

    i   Toggle inversion of diff output.

    L   Toggle display of file line numbers in the diff.

    P   Write the currently viewed diff to a patch file. fnc will prompt the user for a file path, which must be absolute or relative to the current working directory. If no path is input and the return key is entered, the patch will be written to the current working directory using the first ten characters of the current artifact hash as the filename with a .patch extension (e.g., "2870235eef.patch").

    p   In the diff hunk header, toggle display of which function each change is in; for example: @@ -2360,10 +2361,11 @@ draw_commits(struct fnc_view *view)

    S   Toggle display of a side-by-side formatted diff.

    v   Toggle verbosity of diff output. By default, fnc will display the entire content of newly added or deleted files.

    W   Toggle whether end-of-line whitespace changes are ignored when comparing lines in the diff.

    w   Toggle whether whitespace-only changes are ignored when comparing lines in the diff.

    /   Prompt to enter a search term to begin searching the diff output for lines matching the pattern provided. The search term is an extended regular expression, which is documented in re_format(7).

    n   Find the next line that matches the current search term.

    N   Find the previous line that matches the current search term.

tree [-C | --no-colour] [-c | --commit commit] [-h | --help] [-R | --repo path] [path]
        (aliases: dir, tr)
    Display navigable, hierarchical tree of a repository. If a path is specified, display tree nodes of this path. The path may be absolute, relative to the current working directory, or relative to the repository root. With no options passed, the tree will reflect the state of the latest commit on trunk. Unless the --repo option is used, this command must be invoked from within a work tree; that is, fnc assumes a local checkout is open in or above the current working directory.

    Tree nodes are lexicographically ordered and may be postfixed with an identifier corresponding to the mode of the file object on disk as returned by lstat(2):
    / | directory
    * | executable
    @ | symbolic link

    Nodes representing symbolic links are also annotated with the path of the source file.

    Options for fnc tree are as follows:

    -C, --no-colour
        Disable coloured output, which is enabled by default on supported terminals. If this option is not used, colour can be toggled with the c tree view key binding as documented below. User-defined colours are also supported, see ENVIRONMENT for details.

    -c, --commit commit
        The displayed tree will reflect the state of the repository as at the check-in identified by commit. The expected argument is either the name of a branch, which will resolve to the latest commit on the given branch, or (a unique abbreviated prefix of) a valid commit SHA1 or SHA3 hash. For a complete list of valid arguments this option accepts, see Fossil's Check-in Names: https://fossil-scm.org/home/doc/trunk/www/checkin_names.wiki.

    -h, --help
        Display tree command help and usage information then exit.

    -R, --repo path
        Use the fossil(1) repository at the specified path for the current fnc tree invocation. When this option is used, the checkout-related Fossil special tags "current", "prev", and "next" are invalid arguments to the --commit option.

    Key bindings for fnc tree are as follows:

    Enter, Arrow-right, l
        Enter the currently selected directory, or open a blame view of the currently selected file.

    Backspace, Arrow-left, h
        Move up a level to the parent directory. This is a no-op when in the root tree.

    Arrow-down, j
        Move selection cursor one node down the tree.

    Arrow-up, k
        Move selection cursor one node up the tree.

    C-f, Page-down
        Scroll tree view one page downwards in the buffer.

    C-b, Page-up
        Scroll tree view one page upwards in the buffer.

    C-d Scroll tree view half a page downwards in the buffer.

    C-u Scroll tree view half a page upwards in the buffer.

    Home, gg
        Move selection cursor to the first node in the tree.

    End, G
        Move selection cursor to the last node in the tree.

    b   Open and populate branch view with all repository branches.

    c   Toggle coloured output. On supported terminals, fnc will default to displaying the tree in colour.

    d   Toggle ISO8601 modified timestamp display for each tree entry.

    i   Toggle SHA hash display for all file nodes displayed in the tree.

    t   Open timeline view for the currently selected tree node. This will display the timeline of all commits that involve the versioned file(s) corresponding to the selected node.

    /   Prompt to enter a search term to begin searching the tree for nodes matching the entered pattern. The search term is an extended regular expression, as documented in re_format(7), and is matched against the path of each tree node.

    n   Find the next tree node that matches the current search pattern.

    N   Find the previous tree node that matches the current search pattern.

blame [-C | --no-colour] [-c | --commit commit [-r | --reverse]] [-h | --help] [-n | --limit n] [-R | --repo path] path
        (aliases: praise, bl)
    Show commit attribution history for each line of the file at the specified path, which may be absolute, relative to the current working directory, or relative to the repository root. Unless the --repo option is used, this command must be invoked from within a work tree; that is, fnc assumes a local checkout is open in or above the current working directory.

    Options for fnc blame are as follows:

    -C, --no-colour
        Disable coloured output, which is enabled by default on supported terminals. If this option is not used, colour can be toggled with the c blame view key binding as documented below. User-defined colours are also supported, see ENVIRONMENT for details.

    -c, --commit commit
        Start blame of file at the specified path from the check-in identified by commit. The expected argument is either the name of a branch, which will resolve to the latest commit on the given branch, or (a unique abbreviated prefix of) a valid commit SHA1 or SHA3 hash. When this option is not supplied, fnc will blame the version of the file from the current checkout. For a complete list of valid arguments this option accepts, see Fossil's Check-in Names: https://fossil-scm.org/home/doc/trunk/www/checkin_names.wiki.

    -h, --help
        Display blame command help and usage information then exit.

    -l, --line lineno
        Open annotated file at lineno. As documented below, once the file is loaded, the @ key binding can be used to navigate to an arbitrary line in the file.

    -n, --limit n
        Limit depth of blame history to n commits or seconds. The latter is denoted by a postfixed 's' (e.g., 30s). With this option, fnc will traverse either as many commits as specified, or as possible in the specified time limit. By default, fnc will traverse the entire historical record of the file, which can be expensive for large files that span many commits. Use this option for a faster, more targeted annotation.

    -R, --repo path
        Use the fossil(1) repository at the specified path for the current fnc blame invocation. When this option is used, the checkout-related Fossil special tags "current", "prev", and "next" are invalid arguments to the --commit option. When --commit is not specified, fnc will default to blaming the version of the file found in the latest commit.

    -r, --reverse
        Reverse annotate the file starting from a historical commit and move forward in time. That is, rather than show the most recent change to each line, show the first time each line was modified by a subsequent commit after the specified commit. (Requires -c|--commit.)

    Key bindings for fnc blame are as follows:

    Arrow-down, j
        Move selection cursor down one line.

    Arrow-up, k
        Move selection cursor up one line.

    Arrow-right, l
        Scroll the view two columns to the right in the buffer. File output moves left on the screen.

    Arrow-left, h
        Scroll the view two columns to the left in the buffer. File output moves right on the screen.

    $   Scroll the view right to the end of the longest line in the file.

    0   Scroll the view left to the beginning of the line.

    C-f, Page-down
        Scroll blame view one page downwards in the buffer.

    C-b, Page-up
        Scroll blame view one page upwards in the buffer.

    C-d Scroll blame view half a page downwards in the buffer.

    C-u Scroll blame view half a page upwards in the buffer.

    Home, gg
        Move selection cursor to the first line in the file.

    End, G
        Move selection cursor to the last line in the file.

    Enter
        Display the diff of the commit corresponding to the currently selected line.

    #   Toggle display of file line numbers.

    @   Open prompt to enter line number and navigate to that line in the file.

    B, Backspace
        Reload the previous blamed version of the file.

    b   Blame the version of the file corresponding to the commit in the currently selected line.

    c   Toggle coloured output. On supported terminals, fnc will default to displaying the blamed file in colour.

    p   Blame the version of the file corresponding to the parent of the commit in the currently selected line.

    T   Open and populate branch view with all repository branches.

    /   Prompt to enter a search term to begin searching the file for tokens matching the entered pattern. The search term is an extended regular expression, as documented in re_format(7).

    N   Find the previous token that matches the current search pattern.

    n   Find the next token that matches the current search pattern.

branch [-C | --no-colour] [--after date | --before date] [-h | --help] [--open | --closed] [-p | --no-private] [-R | --repo path] [-r | --reverse] [-s | --sort order] [glob]
        (aliases: tag, br)
    Display navigable list of repository branches. If glob is specified, only display branches matching the pattern provided. Pattern matching is case-insensitive unless glob contains at least one uppercase character, in which case the search will be case-sensitive. Unless the --repo option is used, this command must be invoked from within a work tree; that is, fnc assumes a local checkout is open in or above the current working directory.

    Branches are lexicographically ordered by default, and are prefixed with an identifier corresponding to the branch state (i.e., open/closed). The current and private branches are additionally annotated with a postfixed identifier:
    +dev-foo | open
    -rm-bar | closed
    +trunk@ | current
    +wip-baz* | private

    All branches, irrespective of state or privacy, are displayed by default, but can be filtered based on several characteristics.

    Options for fnc branch are as follows:

    -a, --after date
        Display only those branches with activity after the specified date, which is expected to be either an ISO8601 (e.g., 2020-10-10) or unambiguous DD/MM/YYYY or MM/DD/YYYY formatted date.

    -b, --before date
        Display only those branches with activity before the specified date, which is expected to be either an ISO8601 (e.g., 2020-10-10) or unambiguous DD/MM/YYYY or MM/DD/YYYY formatted date.

    -C, --no-colour
        Disable coloured output, which is enabled by default on supported terminals. If this option is not used, colour can be toggled with the c branch view key binding as documented below. User-defined colours are also supported, see ENVIRONMENT for details.

    -c, --closed
        Display only closed branches.

    -h, --help
        Display branch command help and usage information then exit.

    -o, --open
        Display only opened branches.

    -p, --no-private
        Do not show private branches, which are included in the list of displayed branches by default.

    -R, --repo path
        Use the fossil(1) repository at the specified path for the current fnc branch invocation.

    -r, --reverse
        Reverse the order in which branches are displayed.

    -s, --sort order
        Sort branches by order. Valid order values are as follows:
        mru | most recently used state | open/closed state

        Branches are sorted in lexicographical order by default.

    Key bindings for fnc branch are as follows:

    Arrow-down, j
        Move selection cursor down one branch.

    Arrow-up, k
        Move selection cursor up one branch.

    C-f, Page-down
        Scroll branch view one page downwards in the buffer.

    C-b, Page-up
        Scroll branch view one page upwards in the buffer.

    C-d Scroll branch view half a page downwards in the buffer.

    C-u Scroll branch view half a page upwards in the buffer.

    Home, gg
        Move selection cursor to the first branch in the list.

    End, G
        Move selection cursor to the last branch in the list.

    Enter, Space
        Display the timeline of the currently selected branch.

    c   Toggle coloured output. On supported terminals, fnc will default to displaying the branch list in colour.

    d   Toggle display of the date on which the branch last received changes.

    i   Toggle display of the SHA{1,3} hash that identifies branch, which is the hash of the commit on the tip of said branch.

    s   Toggle sort order of currently displayed branches. If branches are ordered lexicographically, fnc will sort branches in most recently used order, otherwise branches will be sorted by their open/closed state.

    t   Open the tree view of the currently selected branch.

    R, C-l
        Reload the view with all repository branches, irrespective of which options were used in this fnc branch invocation.

    /   Prompt to enter a search term to begin searching the list for branches matching the entered pattern. The search term is an extended regular expression, as documented in re_format(7).

    n   Find the next branch that matches the current search pattern.

    N   Find the previous branch that matches the current search pattern.

ENVIRONMENT
Depending on the available screen estate determined by the LINES and COLUMNS environment variables, fnc will display child views in either a horizontal or vertical split. By default, if COLUMNS is ≥ 120, a child view will open in a vertical split at least 80 columns wide. Otherwise, the child view will open in a horizontal split that is approximately 60% of the terminal height. This behaviour can be customised by configuring the following options as either exported environment variables or with fnc config as documented above.

FNC_VIEW_SPLIT_MODE
    Open child views in a horizontal or vertical split. Value can be one of auto, horizontal, or vertical. Default: "auto".

FNC_VIEW_SPLIT_HEIGHT
    Height of the child view when opening in a horizontal split. Valid numeric values are 1 ≤ n < LINES. Percentage values denoted with a postfixed ‘%’ ( e.g., 55%) are also valid. Default: "60%".

FNC_VIEW_SPLIT_WIDTH
    Minimum width of the child view when opening in a vertical split. Currently a no-op. Default: "80".

Similarly, diff options can be persistently applied to all diff views ( i.e., whether directly accessed with fnc diff or via the timeline or branch commands' corresponding key maps) by configuring the following options:

FNC_DIFF_FLAGS
    String containing any or all of the available short form diff boolean flag options documented above ( i.e., bCilPqsWw). If mutually exclusive options "l" and "s" are both specified, whichever is last will take precedence; for example, "lqs" will display side-by-side formatted diffs. Default: NULL.

FNC_DIFF_CONTEXT
    Numeric value as per the above documented -x|--context option ( i.e., 0 n 64) specifying the number of context lines. Illegal values are a no-op. Default: 5.

Any options passed to fnc diff will override the above settings.

fnc displays coloured output by default in supported terminals. Each colour object identified below can be defined by either exporting environment variables (e.g., export FNC_COLOUR_COMMIT=red), or with fnc config as documented above. At startup, fnc will search for user-defined colours in the following order:
1. repository settings | repo.fossil
2. environment variables | shell

If none are found, the default colour scheme will be displayed. This enables setting per-project colours to visually distinguish the current repository being viewed, and globally changing the colour scheme for all repositories with no local settings configured. Except where documented below, colours supported in fnc are:
"black" | "green" | "blue" | "cyan"
"red" | "yellow" | "magenta" | "default"

Where "default" is the current foreground (i.e., text) colour in the terminal. User-definable colour objects displayed in various fnc views are as follows:

FNC_COLOUR_COMMIT
    The commit hash ID field displayed in the timeline, diff, tree, and blame views. If not defined, the default value is "green".

FNC_COLOUR_USER
    The username field displayed in the timeline and diff views. If not defined, the default value is "cyan".

FNC_COLOUR_DATE
    The date field displayed in the timeline and diff views. If not defined, the default value is "yellow".

FNC_COLOUR_DIFF_MINUS
    Removed lines displayed in the diff view. If not defined, the default value is "magenta".

FNC_COLOUR_DIFF_PLUS
    Added lines displayed in the diff view. If not defined, the default value is "cyan".

FNC_COLOUR_DIFF_HUNK
    Hunk header lines (e.g., @@ -732,34 +747,40 @@) displayed in the diff view. If not defined, the default value is "yellow".

FNC_COLOUR_DIFF_META
    Metadata displayed in the diff view. If not defined, the default value is "green".

FNC_COLOUR_DIFF_TAGS
    The tag field displayed in the diff view. If not defined, the default value is "magenta".

FNC_COLOUR_DIFF_SBS_EDIT
    Changed (i.e., not added or removed) lines in the diff view when displaying side-by-side diffs. If not defined, the default value is "red".

FNC_COLOUR_TREE_DIR
    Directory entries displayed in the tree view. If not defined, the default value is "cyan".

FNC_COLOUR_TREE_EXEC
    Executable file entries displayed in the tree view. If not defined, the default value is "green".

FNC_COLOUR_TREE_LINK
    Symbolic link entries displayed in the tree view. If not defined, the default value is "magenta".

FNC_COLOUR_BRANCH_OPEN
    Open branches displayed in the branch view. If not defined, the default value is "cyan".

FNC_COLOUR_BRANCH_CLOSED
    Closed branches displayed in the branch view. If not defined, the default value is "magenta".

FNC_COLOUR_BRANCH_CURRENT
    The branch corresponding to the current checkout displayed in the branch view. If not defined, the default value is "green".

FNC_COLOUR_BRANCH_PRIVATE
    Private branches displayed in the branch view. If not defined, the default value is "yellow".

FNC_COLOUR_HL_LINE
    Selected line highlight in the diff view. Value can be one of auto or mono. The former will invert the foreground colour of the selected line, while the latter will use a monochromatic highlight. If not defined, the default value is "auto".

FNC_COLOUR_HL_SEARCH
    Search term highlight in blame and diff view. If not defined, the default value is "yellow".

To clear environment variables, issue unset ENVIRONMENT_VARIABLE in the shell.

fnc displays best with UTF-8, and will detect whether UTF-8 is enabled to determine which characters to draw in certain views. If UTF-8 is supported by your terminal but is currently disabled, it can be enabled with "export LC_ALL=en_US.UTF-8"; If not available, fnc will revert to ASCII. Relatedly, some fonts may render certain characters poorly in the help screen; Monospace Regular, JetBrains Mono, and Menlo are known to render all characters well.

EXIT STATUS

SEE ALSO
fossil(1), sqlite3(1), re_format(7)

AUTHORS
Mark Jamsek <mark@jamsek.com>