Skip to main content

Sapling

What

Display sapling information when in a sapling repository.

Sample Configuration

{
"type": "sapling",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#193549",
"background": "#4C9642",
"background_templates": [
"{{ if .Bookmark }}#4C9642{{ end }}"
],
"properties": {
"fetch_status": true
}
}

Properties

Fetching information

NameTypeDefaultDescription
fetch_statusbooleantruefetch the local changes - defaults to
native_fallbackbooleanfalsewhen set to true and sl.exe is not available when inside a WSL2 shared Windows drive, we will fallback to the native sl executable to fetch data. Not all information can be displayed in this case
status_formatsmap[string]stringa key, value map allowing to override how individual status items are displayed. For example, "status_formats": { "Added": "Added: %d" } will display the added count as Added: 1 instead of +1. See the Status section for available overrides

Template (info)

default template
{{ if .Bookmark }}\uf097 {{ .Bookmark }}*{{ else }}\ue729 {{ .ShortHash }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}

Properties

NameTypeDescription
.RepoNamestringthe repo folder name
.WorkingStatuschanges in the worktree (see below)
.Descriptionstringthe first line of the commit's description
.Authorstringthe author of the commit
.Hashstringthe full hash of the commit
.ShortHashstringthe short hash of the commit
.Whenstringthe commit's relative time indication
.Bookmarkstringthe commit's bookmark (if any)
.Dirstringthe repository's root directory
.Newbooleantrue when there are no commits in the repo

Status

NameTypeDescription
.Modifiedintnumber of modified changes
.Addedintnumber of added changes
.Deletedintnumber of removed changes
.Untrackedbooleannumber of untracked changes
.Cleanintnumber of clean changes
.Missingintnumber of missing changes
.Ignoredbooleannumber of ignored changes
.Stringstringa string representation of the changes above

Local changes use the following syntax:

IconDescription
~Modified
+Added
-Deleted
?Untracked
=Clean
!Missing
ØIgnored