feat: add pijul_channel module (#4765)

* feat: Pijul VCS support

* Extra bits needed for new module.

* Format Markdown table.

* Fix lint.

* Don't test Pijul module so thoroughly.

Installing from source is too expensive, and compiled binaries are only
available for Windows (and unofficially as well). Perhaps once Pijul
1.0.0 comes out of beta there will be more binaries available in package
  repos.

* Format!

* Bad rebase, remove Pijul install from workflow.

* Mock Pijul commands for code coverage.

* Make fake .pijul directory in fixture.

* Truly mock `pijul` command.

* Rename module from `pijul` to `pijul_channel`.

* Format!

* Fix config-schema.json.

* Missed changing module name in docs/ folder.
This commit is contained in:
Lyle Mantooth
2022-12-31 09:55:23 -05:00
committed by GitHub
parent 8d2256ab1d
commit 67b6376e2e
13 changed files with 348 additions and 0 deletions
@@ -130,6 +130,9 @@ format = '\[[$symbol($version)]($style)\]'
[php]
format = '\[[$symbol($version)]($style)\]'
[pijul_channel]
format = '\[[$symbol$channel]($style)\]'
[pulumi]
format = '\[[$symbol$stack]($style)\]'
@@ -108,6 +108,9 @@ Windows = " "
[package]
symbol = " "
[pijul_channel]
symbol = "🪺 "
[python]
symbol = " "
@@ -156,6 +156,9 @@ symbol = "pl "
[php]
symbol = "php "
[pijul_channel]
symbol = "pijul "
[pulumi]
symbol = "pulumi "
+16
View File
@@ -271,6 +271,7 @@ $git_state\
$git_metrics\
$git_status\
$hg_branch\
$pijul_channel\
$docker_context\
$package\
$c\
@@ -3175,6 +3176,21 @@ By default the module will be shown if any of the following conditions are met:
format = 'via [🔹 $version](147 bold) '
```
## Pijul Channel
The `pijul_channel` module shows the active channel of the repo in your current directory.
### Options
| Option | Default | Description |
| ------------------- | --------------------------------- | ------------------------------------------------------------------------------------ |
| `symbol` | `' '` | The symbol used before the pijul channel name of the repo in your current directory. |
| `style` | `'bold purple'` | The style for the module. |
| `format` | `'on [$symbol$channel]($style) '` | The format for the module. |
| `truncation_length` | `2^63 - 1` | Truncates the pijul channel name to `N` graphemes |
| `truncation_symbol` | `'…'` | The symbol used to indicate a branch name was truncated. |
| `disabled` | `true` | Disables the `pijul` module. |
## Pulumi
The `pulumi` module shows the current username, selected [Pulumi Stack](https://www.pulumi.com/docs/intro/concepts/stack/), and version.