mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
chore: fix some comments
Signed-off-by: mountcount <cuimoman@outlook.com>
This commit is contained in:
parent
0f58cf8226
commit
e75554b24b
|
@ -140,7 +140,7 @@ end
|
||||||
| `{{.Var}}` | Variable in a struct, where Var is a variable. |
|
| `{{.Var}}` | Variable in a struct, where Var is a variable. |
|
||||||
| `{{- .Var -}}` | Remove extra white space surrounding the .Var variable and remove the newline. Either side is fine too. |
|
| `{{- .Var -}}` | Remove extra white space surrounding the .Var variable and remove the newline. Either side is fine too. |
|
||||||
| `{{ $planet := "Earth"}}` | `{{ $planet }}` Store a value in a custom variable to reference later. Note that .$ is used to reference the global/parent context, like in the full example below with $. |
|
| `{{ $planet := "Earth"}}` | `{{ $planet }}` Store a value in a custom variable to reference later. Note that .$ is used to reference the global/parent context, like in the full example below with $. |
|
||||||
| `Hi {{if .Name}} {{.Name}} {{else}} visitor {{end}}` | If-else statement. If will will evaluate whether or not the argument is empty. Using the elseif conditional is also an option. The not negation is available too. |
|
| `Hi {{if .Name}} {{.Name}} {{else}} visitor {{end}}` | If-else statement. If will evaluate whether or not the argument is empty. Using the elseif conditional is also an option. The not negation is available too. |
|
||||||
| `{{if and .Arg1 .Arg2}} both complete. {{else}} incomplete. {{end}}` | The and function compares multiple arguments to return the boolean AND (if arg1 then arg2 else arg1). Both arguments are evaluated. The or function compares multiple arguments to return the boolean OR. Similar to if arg1 then arg1 else arg2, so arg2 will never be evaluated if arg1 is false (not empty). |
|
| `{{if and .Arg1 .Arg2}} both complete. {{else}} incomplete. {{end}}` | The and function compares multiple arguments to return the boolean AND (if arg1 then arg2 else arg1). Both arguments are evaluated. The or function compares multiple arguments to return the boolean OR. Similar to if arg1 then arg1 else arg2, so arg2 will never be evaluated if arg1 is false (not empty). |
|
||||||
| `{{with .Var}} {{end}}` | With statement, where Var is a variable. It skips the block if the variable is absent. |
|
| `{{with .Var}} {{end}}` | With statement, where Var is a variable. It skips the block if the variable is absent. |
|
||||||
| `{{range .Array}} {{end}}` | Range statement, where Array is an array, slice, map, or channel. |
|
| `{{range .Array}} {{end}}` | Range statement, where Array is an array, slice, map, or channel. |
|
||||||
|
|
|
@ -152,7 +152,7 @@ cm status
|
||||||
|
|
||||||
**Test hint:** Both `Private` and `Added` files should be counted towards the `Added` property of the `plastic` segment.
|
**Test hint:** Both `Private` and `Added` files should be counted towards the `Added` property of the `plastic` segment.
|
||||||
|
|
||||||
### Commiting changes
|
### Committing changes
|
||||||
|
|
||||||
After locally adding, changing, moving or deleting files you want to commit them to create a new changeset.
|
After locally adding, changing, moving or deleting files you want to commit them to create a new changeset.
|
||||||
Run this command to commit all local changes:
|
Run this command to commit all local changes:
|
||||||
|
|
|
@ -90,7 +90,7 @@ You can set the following property to `true` to enable fetching additional infor
|
||||||
| `.Selector` | `string` | the current selector context (branch/changeset/label) |
|
| `.Selector` | `string` | the current selector context (branch/changeset/label) |
|
||||||
| `.Behind` | `bool` | the current workspace is behind and changes are incoming |
|
| `.Behind` | `bool` | the current workspace is behind and changes are incoming |
|
||||||
| `.Status` | `Status` | changes in the workspace (see below) |
|
| `.Status` | `Status` | changes in the workspace (see below) |
|
||||||
| `.MergePending` | `bool` | if a merge is pending and needs to be commited (known issue: when no file is left after a _Change/Delete conflict_ merge, the `MergePending` property is not set) |
|
| `.MergePending` | `bool` | if a merge is pending and needs to be committed (known issue: when no file is left after a _Change/Delete conflict_ merge, the `MergePending` property is not set) |
|
||||||
|
|
||||||
### Status
|
### Status
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue