perf(crystal): Lazily evaluate version command (#2129)

* perf(crystal): Lazily evaluate version command

This updates the module to lazily execute the `crystal --version`
command only when the `version` variable is used in the format string.

* perf(crystal): Update format string

Update format string to handle the `$version` variable not being set.
This commit is contained in:
Thomas O'Donnell
2021-01-13 18:35:44 +01:00
committed by GitHub
parent d49ff412f6
commit f640db87a4
3 changed files with 13 additions and 12 deletions
+6 -6
View File
@@ -567,12 +567,12 @@ The module will be shown if any of the following conditions are met:
### Options
| Option | Default | Description |
| ---------- | ---------------------------------- | --------------------------------------------------------- |
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. |
| `style` | `"bold red"` | The style for the module. |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `crystal` module. |
| Option | Default | Description |
| ---------- | ------------------------------------ | --------------------------------------------------------- |
| `symbol` | `"🔮 "` | The symbol used before displaying the version of crystal. |
| `style` | `"bold red"` | The style for the module. |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `disabled` | `false` | Disables the `crystal` module. |
### Variables