feat(cmake): Add CMake module (#1456)

* feat: CMake module

* docs: Document symbol variable
This commit is contained in:
Tilmann Meyer
2020-07-09 21:40:33 +02:00
committed by GitHub
parent 7edd0f6218
commit bd68970fab
8 changed files with 148 additions and 1 deletions
+26
View File
@@ -187,6 +187,7 @@ $git_status\
$hg_branch\
$docker_context\
$package\
$cmake\
$dotnet\
$elixir\
$elm\
@@ -425,6 +426,31 @@ error_symbol = "[➜](bold red) "
vicmd_symbol = "[V](bold green) "
```
## CMake
The `cmake` module shows the currently installed version of CMake if:
- The current directory contains a `CMakeLists.txt` file
### Options
| Option | Default | Description |
| ---------- | ---------------------------------- | -------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `symbol` | `"🛆 "` | The symbol used before the version of cmake. |
| `style` | `"bold blue"` | The style for the module. |
| `disabled` | `false` | Disables the `cmake` module. |
### Variables
| Variable | Example | Description |
| -------- | --------- | ------------------------------------ |
| version | `v3.17.3` | The version of cmake |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
\*: This variable can only be used as a part of a style string
## Command Duration
The `cmd_duration` module shows how long the last command took to execute.