Sapling
What
Display Sapling information when in a sapling repository.
Sample Configuration
- json
- yaml
- toml
Options
Fetching information
As doing multiple Sapling (sl) calls can slow down the prompt experience, we only fetch what your config displays. Oh My Posh inspects every template in your config - segment, color and style templates, cross-segment references, extra prompts, tooltips, fillers, palette values and the console title - and runs the status fetch only when one of them references a field it populates.
| Name | Type | Default | Description |
|---|---|---|---|
native_fallback | boolean | false | when 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_formats | map[string]string | a 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
| Name | Type | Description |
|---|---|---|
.RepoName | string | the repo folder name |
.Working | Status | changes in the worktree (see below) |
.Description | string | the first line of the commit's description |
.Author | string | the author of the commit |
.Hash | string | the full hash of the commit |
.ShortHash | string | the short hash of the commit |
.When | string | the commit's relative time indication |
.Bookmark | string | the commit's bookmark (if any) |
.Dir | string | the repository's root directory |
.RelativeDir | string | the current directory relative to the root directory |
.New | boolean | true when there are no commits in the repo |
Status
| Name | Type | Description |
|---|---|---|
.Modified | int | number of modified changes |
.Added | int | number of added changes |
.Deleted | int | number of removed changes |
.Untracked | boolean | number of untracked changes |
.Clean | int | number of clean changes |
.Missing | int | number of missing changes |
.Ignored | boolean | number of ignored changes |
.String | string | a string representation of the changes above |
Local changes use the following syntax:
| Icon | Description |
|---|---|
~ | Modified |
+ | Added |
- | Deleted |
? | Untracked |
= | Clean |
! | Missing |
Ø | Ignored |