Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
FNC(1)			    General Commands Manual			FNC(1)

NAME
       fnc -- interactive text-based user interface for	Fossil repositories

SYNOPSIS
       fnc [-z]	[-R repository]	command	[arg ...]
       fnc [-hv]
       fnc path

       fnc blame [-Chr]	[-c commit] [-l	lineno]	[-n n] path
       fnc branch [-Cchopr] [-a	date] [-b date]	[-s order] [glob]
       fnc config [-hl]	[-u option] [option [value]]
       fnc diff	[-bCDhiloPqsWw]	[-x n] [artifact1 [artifact2]] [path ...]
       fnc stash [-ChP]	[-x n] [(get|pop) [id]]
       fnc  timeline  [-Ch]  [-b branch] [-c commit] [-f glob] [-n n] [-T tag]
	   [-t type] [-u user] [path]
       fnc tree	[-Ch] [-c commit] [path]

DESCRIPTION
       fnc is an interactive text-based	user interface for exploring fossil(1)
       repositories, and managing local	changes	in a Fossil work tree.

       To facilitate navigation	and display repository data, fnc supports mul-
       tiple views:

       Timeline
	       Display commits from the	repository's  history  in  chronologi-
	       cally descending	order.	If no command or only a	path is	speci-
	       fied, fnc will default to displaying this view.

       Diff    Display changes introduced in the specified commit, between two
	       repository artifacts, or	local changes in the work tree.

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

       Blame   Display and annotate each line in the given file	with  the  hy-
	       perlinked commit	in which the line was last modified.

       Branch  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.

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

       -z, --utc   Display  dates and timestamps in Coordinated	Universal Time
		   (UTC) rather	than local time.  This can also	be  configured
		   with	the FNC_UTC option (see	"ENVIRONMENT" for details).

       Global key bindings are as follows:

       H, ?, F1
	       Display runtime help.

       C       Toggle between coloured and monochromatic output.  On supported
	       terminals,  fnc will default to displaying all views in colour.
	       Colours can be customised using the config command or  environ-
	       ment variables (see "ENVIRONMENT" for details).

       Tab     Switch focus between open views.

       f       Toggle  between	fullscreen  and	splitscreen mode.  By default,
	       fnc will	open child views in a vertical split if	 the  terminal
	       window is >= 120	columns	wide.  Set FNC_VIEW_SPLIT_MODE as doc-
	       umented in the "ENVIRONMENT" section to change this behaviour.

       s       Switch  between horizontal and vertical splitscreen layout, and
	       render all active views in the new layout.  If the terminal  is
	       not  wide enough	when switching to a vertical split, views will
	       render in fullscreen.

       (       When in a splitscreen view, decrease the	 size  of  the	active
	       split.

       )       When  in	 a  splitscreen	 view, increase	the size of the	active
	       split.

       G, End  Scroll to the last line in the view.

       gg, Home
	       Scroll to the first line	in the view.

       Q       Quit fnc.

       q       Quit the	active view.

       Commands	available to fnc are as	follows:

       config [-hl] [-u	option | option	[value]]
		      (aliases:	conf, set)
		Retrieve the current or	set a new value	for option in the  lo-
		cal  repository.   When	 specified,  value will	become the new
		value for option, otherwise fnc	will display the current value
		of option.  With no arguments, fnc config will list all	 user-
		defined	 options; see "ENVIRONMENT" for	a detailed list	of all
		available options and their default values.

		During initialisation, if no value is defined for a given  op-
		tion  in  the  local repository, environment variables will be
		searched.  If still not	found, fnc will	 fallback  to  default
		values.

		Unless	the  global  -R	 option	is used	to specify a fossil(1)
		repository, 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.

		-l, --ls
			List all available options.

		-u, --unset option
			Clear the specified option.

       stash [-ChP] [-x	n] [(get|pop) [id]]
		      (aliases:	save, sta)
		When run with neither the get nor pop subcommands,  fnc	 stash
		will  interactively iterate over each hunk comprising the diff
		of local changes in the	work tree, and prompt the user to  ei-
		ther stash or keep the current hunk.

		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 current file
		k      no, do not stash	this hunk nor any remaining hunks in the current 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
		Q      abort the stash operation and discard any previous selections
		?      display help dialog

		^Conditionally available when the current hunk occupies	multi-
		ple pages.

		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 being
		prompted for the stash message), the operation can be  aborted
		by either answering "Q"	at the prompt or opening the help dia-
		log  and  entering  the	 Q key binding.	 This will discard any
		previous selections and	leave the work tree unchanged.

		Available subcommands for fnc stash are	as follows:

		get [id]
			(aliases: apply)
		  Retrieve the stash changeset corresponding to	the  specified
		  id  and apply	it to the current checkout.  If	id is omitted,
		  the most recent stash	entry will be applied.

		pop [id]
		  Like get, but	also  remove  the  changeset  from  the	 stash
		  cache.

		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
			Do  not	display	the enclosing function or scope	in the
			hunk header.  The heuristic used to determine the  en-
			closing	scope will produce reliable results for	all C-
			like	languages    (e.g.,   C/C++,   Java,   Python,
			JavaScript); however, Lisps and	non-source code	(e.g.,
			make(1), Markdown, reStructuredText) will return mean-
			ingless	results.

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

       timeline	[-Chz] [-b branch] [-c commit] [-f glob] [-n n]	[-T  tag]  [-t
		type] [-u user]	[path]
		      (aliases:	log, tl)
		Display	 repository  history  with  a chronological log	of all
		commits.  If path is specified,	only show commits  that	 modi-
		fied the file(s) at this path.	The path may be	absolute, rel-
		ative  to  the	current	 working directory, or relative	to the
		repository root.

		Unless the global -R option is used  to	 specify  a  fossil(1)
		repository,  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  invoked  in	 a  work  tree,	the log	entry of the commit on
		which the checkout is based will be prefixed with one  of  the
		following annotations:

		@      work  tree  of the checked-out commit contains no local
				      changes
		~      work tree of  the  checked-out  commit  contains	 local
				      changes

		This  command  will  be	 executed by default if	fnc is invoked
		without	an explicit command.

		Options	for fnc	timeline are as	follows:

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

		-C, --no-colour
			Disable	coloured 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
			Start  timeline	 traversal  from the specified commit.
			The expected argument is either	a  symbolic  reference
			(e.g.,	branch	name,  tag),  or (a unique abbreviated
			prefix of) a valid commit SHA1 or SHA3 hash, or	an ISO
			8601 formatted date.  When this	option	is  not	 used,
			fnc will begin traversing history from the latest com-
			mit.   For a complete list of valid arguments this op-
			tion   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, which will  make  the	search
			case-sensitive.	  Filtering  can  also be performed at
			runtime	with the F timeline view key binding as	 docu-
			mented 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 repository history.  Negative
			values are a no-op.

		-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,  which  will
			make  the search case-sensitive.  By default, fnc will
			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, fnc	will 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,	which  will  make  the
			search case-sensitive.

		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 view to the right in the	buffer.	 Comment field
			contents move left on the screen.

		Arrow-left, h
			Scroll	view to	the left in the	buffer.	 Comment field
			contents move right on the screen.

		$	Scroll view to the rightmost  position.	  This	corre-
			sponds	to  the	end of the longest log message summary
			line on	the page.

		0	Scroll view left to the	start 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 of one page downwards	in the
			buffer.

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

		Enter	Open  a	diff view displaying the changeset of the cur-
			rently selected	commit.

		Space	Tag or untag the currently selected commit as the base
			commit	for  the  next	tagged	commit	to  be	diffed
			against.   If another commit is	already	tagged,	open a
			diff view showing the changes between it and the  cur-
			rently selected	commit.

		b	Open  and  populate  a branch view with	all repository
			branches.  One of the listed branches can be  selected
			to display a new timeline view of its commit history.

		D	Diff  local  changes  on disk in the current work tree
			against	the currently selected commit.

		F	Prompt to enter	a search term to filter	a new timeline
			view that displays  commits  with  comment,  user,  or
			branch fields that match the entered pattern.

		t	Open a tree view displaying 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 that is matched
			against	the comment, author username, branch, and SHA1
			or  SHA3  hash	of each	commit in the repository.  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 in
			progress (i.e.,	operations executed with / or G/End).

       diff [-bCDhiloPqsWw] [-x	n] [artifact1 [artifact2]] [path ...]
		      (alias: di)
		Display	the differences	between	two repository	artifacts,  or
		between	the local changes in the work tree and a given commit.

		If  invoked  in	 a work	tree with no artifact arguments	speci-
		fied, fnc will show the	differences between the	local  changes
		in  the	work tree and the commit on which the current checkout
		is based.  If invoked in a work	tree  and  only	 artifact1  is
		specified,  fnc	 will  show  the differences between the local
		changes	 in  the  work	tree  and  the	commit	referenced  by
		artifact1.   When  artifact1  and artifact2 are	specified, the
		differences between these  two	versions  will	be  displayed.
		Both  artifact	arguments must resolve to the same type	(i.e.,
		commits	or blobs), and are expected  to	 be  either:  symbolic
		references  (e.g.,  branch names, tags); a commit or blob SHA1
		or SHA3	(unique	abbreviated) hash; or an  ISO  8601  formatted
		date.	If  one	 or more path arguments	are supplied, fnc will
		filter diffs so	that only changes involving the	file(s)	in the
		named paths are	displayed.  Paths may be absolute, relative to
		the current working directory, or relative to  the  repository
		root.

		When  invoked outside a	work tree with the global -R option or
		requesting the differences between blobs, both artifact	 argu-
		ments  must be specified; in the latter	case, any trailing ar-
		guments	are invalid and	will be	ignored.

		Unless the global -R option is used  to	 specify  a  fossil(1)
		repository,  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
			Omit  all changes.  Show the file index	and hash lines
			only.

		-C, --no-colour
			Disable	coloured diff output, which is enabled by  de-
			fault  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).

		-D, --min-diffstat
			Show minimal diffstat instead of the more verbose plot
			bar histogram.

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

		-i, --invert
			Invert the differences between artifacts.

		-l, --line-numbers
			Display	actual file line numbers in diff output.

		-o, --no-curses
			Do not initialise curses  to  render  the  diff	 view.
			Write the diff directly	to the standard	output.

		-P, --no-prototype
			Do  not	display	the enclosing function or scope	in the
			hunk header.  The heuristic used to determine the  en-
			closing	scope will produce reliable results for	all C-
			like	languages    (e.g.,   C/C++,   Java,   Python,
			JavaScript); however, Lisps and	non-source code	(e.g.,
			make(1), Markdown, reStructuredText) will return mean-
			ingless	results.  This option  is  mutually  exclusive
			with  -l and -s, which produce incompatible hunk head-
			ers.

		-q, --quiet
			Do not output  complete	 content  of  newly  added  or
			deleted	 files,	 which are displayed by	default.  Only
			show the file index and	hash lines.

		-s, --sbs
			Display	a side-by-side formatted diff.	This option is
			mutually exclusive with	-l.

		-W, --whitespace-eol
			Ignore end-of-line whitespace-only changes.

		-w, --whitespace
			Ignore whitespace-only changes.

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

		All the	above options (except -h and -o) can be	 made  persis-
		tent  as  global  or repository	options	via the	FNC_DIFF_FLAGS
		option (see "ENVIRONMENT" for details).

		Key bindings for fnc diff are as follows:

		Arrow-down, j
			Scroll view one	line downwards in  the	buffer.	  Diff
			output moves upwards on	the screen.

		Arrow-up, k
			Scroll view one	line upwards in	the buffer.  Diff out-
			put moves downwards on the screen.

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

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

		$	Scroll	view  to  the rightmost	position.  This	corre-
			sponds to the end of the longest line on the page.

		0	Scroll view left to the	start of the line.

		C-e	Move the selection cursor down one line.

		C-y	Move the selection cursor up one line.

		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 of one  page  downwards  in  the
			buffer.

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

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

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

		C-p	Navigate to the	previous file in the diff.

		C-n	Navigate to the	next file in the diff.

		[	Navigate to the	previous hunk in the diff.

		]	Navigate to the	next hunk in the diff.

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

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

		#	Toggle the display of diff view	(not actual file) line
			numbers.

		@	Open prompt to enter a 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 the branch view with all  repository
			branches.

		D	Toggle between minimal and histogram diffstat.

		i	Toggle inversion of diff output.

		L	Toggle file line number	formatted diff.

		P	Write  the  currently  viewed  diff to a file on disk.
			fnc will prompt	the user for a path, which can be  ab-
			solute	or  relative, that points to a location	in ei-
			ther the current work tree or the tmp  directory.   If
			no  path  is  input and	the return key is entered, the
			diff will be written to	the current working  directory
			using the first	ten characters of the current artifact
			hash  as  the filename with a ".diff" extension	(e.g.,
			2870235eef.diff).  If the path already exists, it will
			be overwritten.

		p	In the diff hunk header, toggle	display	of which func-
			tion or	scope 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 ig-
			nored 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 [-Ch] [-c commit] [path]
		      (aliases:	dir, tr)
		Display	a navigable tree of the	repository.

		If  a  path  is	 specified, display the	corresponding subtree,
		otherwise display the root of the tree.	 The path may  be  ab-
		solute,	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  global  -R	 option	is used	to specify a fossil(1)
		repository, 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 ob-
		ject on	disk as	returned by lstat(2):

		      /	     directory
		      *	     executable
		      @	     symbolic link

		Nodes representing symbolic links are further  annotated  with
		the path of the	source file (e.g., symlink@ -> targetpath)

		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
			Display	 the  repository  tree	corresponding  to  the
			checkin	 identified  by	commit.	 The expected argument
			is either a symbolic  reference	 (e.g.,	 branch	 name,
			tag), or (a unique abbreviated prefix of) a valid com-
			mit  SHA1 or SHA3 hash,	or an ISO 8601 formatted date.
			When this option is not	used,  fnc  will  display  the
			tree  of  the  latest  commit.	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.

		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  of one page downwards	in the
			buffer.

		C-u	Scroll tree view half  of  one	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 the branch view with	all repository
			branches.

		d	Toggle display of the last modified timestamp for each
			tree entry.

		i	Toggle display of the hash ID for all  file  nodes  in
			the tree.

		t	Open  the timeline view	of the currently selected tree
			entry.	This will display the log of all  commits  in-
			volving	 the  tracked file(s) corresponding to the se-
			lected tree node.

		/	Prompt to enter	a search term to begin	searching  the
			tree  for  entries  matching the entered pattern.  The
			search term is an extended regular expression, as doc-
			umented	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 [-Chr] [-c	commit]	[-l lineno] [-n	n] path
		      (aliases:	praise,	bl)
		Show  commit  attribution history for each line	of the file at
		the named path,	which may be absolute, relative	to the current
		working	directory, or relative to the repository root.

		Unless the global -R option is used to	specifiy  a  fossil(1)
		repository,  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 bind-
			ing as documented  below.   User-defined  colours  are
			also supported (see "ENVIRONMENT" for details).

		-c, --commit commit
			Start  annotation  of the tracked file from the	speci-
			fied commit.  The expected argument is either  a  sym-
			bolic reference	(e.g., branch name, tag), or (a	unique
			abbreviated  prefix  of)  a  valid commit SHA1 or SHA3
			hash, or an ISO	8601 formatted date.  When this	option
			is not used, fnc will begin annotation from the	latest
			commit.	 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  the  annotated  file  and	 navigate  directly to
			lineno.

		-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  op-
			tion for a faster, more	targeted annotation.

		-r, --reverse
			Reverse	 annotate  the file starting from a historical
			commit and move	forward	in time	 so  that  instead  of
			showing	the most recent	commit that changed each line,
			show  the  first  commit that modified each line after
			the specified commit (requires -c).

		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 view to the right in the	buffer.	 File contents
			move left on the screen.

		Arrow-left, h
			Scroll view to the left	in the buffer.	File  contents
			move right on the screen.

		$	Scroll	view  to  the rightmost	position.  This	corre-
			sponds to the end of the longest line on the page.

		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 of one page  downwards  in  the
			buffer.

		C-u	Scroll	blame  view  half  of  one 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	Open a diff view of the	commit	corresponding  to  the
			currently selected line.

		#	Toggle display of file line numbers.

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

		P, Backspace
			Reload the previously blamed version of	the file.

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

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

		b	Open and populate a branch view	 with  all  repository
			branches.

		t	Open  a	timeline view that begins traversing the time-
			line from the commit corresponding  to	the  currently
			selected annotated line.

		/	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 doc-
			umented	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 [-Cchopr]	[-a date] [-b date] [-s	order] [glob]
		      (aliases:	br, ref)
		Display	navigable list of repository branches.

		If  glob is specified, only display branches matching the pat-
		tern provided.	Pattern	matching  is  case-insensitive	unless
		glob  contains	at  least  one uppercase character, which will
		make the search	case-sensitive.

		Unless the global -R option is used  to	 specify  a  fossil(1)
		repository,  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
		further	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 characteris-
		tics.

		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 ISO
			8601 (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  ISO
			8601  (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 bind-
			ing 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, --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 de-
			fault.

		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	of one page downwards  in  the
			buffer.

		C-u	Scroll	branch	view  half  of one 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	a timeline  view  of  the  currently  selected
			branch.

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

		i	Toggle display of the SHA1 or SHA3 hash	 that  identi-
			fies  each  branch,  which  is	the commit hash	of the
			branch tip.

		o	Toggle sort order  of  currently  displayed  branches.
			fnc  will cycle	from lexicographical order to most re-
			cently used and	then open/closed state.

		t	Open a tree view of the	currently selected branch.

		R, C-l	Reload the view	with all  repository  branches,	 irre-
			spective 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 doc-
			umented	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
       When the	terminal window	is >= 120 columns wide,	fnc will display child
       views  in  a  vertical  split  at  least	 80  columns wide, otherwise a
       fullscreen will be used.	 To open child views in	a horizontal split in-
       stead, configure	the following option as	either an exported environment
       variable	or with	fnc config as documented above.

       FNC_VIEW_SPLIT_MODE  Open child	views  in  a  horizontal  or  vertical
			    split.    Value  can  be  either  "horizontal"  or
			    "vertical" (default: vertical).

       fnc displays all	dates and timestamps in	local time unless  the	global
       -z  option  is specified, in which case all dates and timestamps	are in
       Coordinated Universal Time (UTC).  This can be made persistent  without
       using the global	-z option by setting the following option as either an
       exported	environment variable or	with fnc config	as documented above.

       FNC_UTC	If  set	 to a non-empty	value, display dates and timestamps in
		Coordinated Universal Time (UTC).

       Similarly, diff options can be persistently applied to all  diff	 views
       whether	directly  accessed  with  fnc  diff  or	as a child view	of the
       timeline	or blame views by configuring the following options:

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

       FNC_DIFF_CONTEXT	 Numeric value as per the above	documented  -x	option
			 (i.e.,	0 <= n <= 64) specifying the number of context
			 lines (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 envi-
       ronment variables (e.g.,	export	FNC_COLOUR_COMMIT=red),	 or  with  fnc
       config  as  documented above.  At startup, fnc will search for user-de-
       fined colours in	the following order:

	     1.	repository options	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 options configured.  Except where	 docu-
       mented 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
				  (default: "green").

       FNC_COLOUR_USER		  The username field displayed in the timeline
				  and diff views (default: "cyan").

       FNC_COLOUR_DATE		  The date field displayed in the timeline and
				  diff views (default: "yellow").

       FNC_COLOUR_DIFF_MINUS	  Removed lines	displayed  in  the  diff  view
				  (default: "magenta").

       FNC_COLOUR_DIFF_PLUS	  Added	 lines	displayed  in  the  diff  view
				  (default: "cyan").

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

       FNC_COLOUR_DIFF_META	  Metadata  displayed	in   the   diff	  view
				  (default: "green").

       FNC_COLOUR_DIFF_TAGS	  The  tag  field  displayed  in the diff view
				  (default: "magenta").

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

       FNC_COLOUR_TREE_DIR	  Directory entries displayed in the tree view
				  (default: "cyan").

       FNC_COLOUR_TREE_EXEC	  Executable file  entries  displayed  in  the
				  tree view (default: "green").

       FNC_COLOUR_TREE_LINK	  Symbolic  link entries displayed in the tree
				  view (default: "magenta").

       FNC_COLOUR_BRANCH_OPEN	  Open branches	displayed in the  branch  view
				  (default: "cyan").

       FNC_COLOUR_BRANCH_CLOSED	  Closed branches displayed in the branch view
				  (default: "magenta").

       FNC_COLOUR_BRANCH_CURRENT  The  branch  corresponding  to  the  current
				  checkout  displayed  in  the	 branch	  view
				  (default: "green").

       FNC_COLOUR_BRANCH_PRIVATE  Private  branches  displayed	in  the	branch
				  view (default: "yellow").

       FNC_COLOUR_HL_LINE	  Selected line	highlight in  the  diff	 view.
				  Value	 can be	one of auto or mono.  The for-
				  mer will invert the foreground colour	of the
				  selected line, while the latter will	use  a
				  monochromatic	highlight (default: "auto").

       FNC_COLOUR_HL_SEARCH	  Search  term highlight in the	blame and diff
				  views	(default: "yellow").

       To clear	environment variables, invoke the shell	builtin	unset; for ex-
       ample, "unset FNC_DIFF_CONTEXT".	 As documented	above,	local  options
       can be unset with fnc config -u option.

       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_CTYPE=en_US.UTF-8"; If	not available, fnc will	revert
       to ASCII.  Relatedly, some fonts	may render certain  characters	poorly
       in  the	help  screen  as  they	lack  the  requisite glyphs; Monospace
       Regular,	JetBrains Mono,	and Menlo are known to render  all  characters
       well.

EXIT STATUS
       The fnc utility exits 0 on success, and >0 if an	error occurs.

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

AUTHORS
       Mark Jamsek <mark@jamsek.com>

FreeBSD	Ports 14.quarterly	  $Mdocdate$				FNC(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=fnc&sektion=1&manpath=FreeBSD+Ports+14.3.quarterly>

home | help