mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(ocaml): Add OCaml module (#1218)
* Add OCaml module * Update README.md accordingly * Fix typo * Add Reason support Obtain OCaml version using `-vnum` flag. Extend conditions to match projects using jbuild, esy or merlin. * Update README.md Co-authored-by: Dario Vladovic <d.vladimyr@gmail.com>
This commit is contained in:
committed by
GitHub
parent
1b2ea77b1c
commit
9e8f35d746
@@ -116,6 +116,7 @@ prompt_order = [
|
||||
"java",
|
||||
"julia",
|
||||
"nodejs",
|
||||
"ocaml",
|
||||
"php",
|
||||
"python",
|
||||
"ruby",
|
||||
@@ -1098,6 +1099,35 @@ package, and shows its current version. The module currently supports `npm`, `ca
|
||||
symbol = "🎁 "
|
||||
```
|
||||
|
||||
## OCaml
|
||||
|
||||
The `ocaml` module shows the currently installed version of OCaml.
|
||||
The module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a file with `.opam` extension or `_opam` directory
|
||||
- The current directory contains a `esy.lock` directory
|
||||
- The current directory contains a `dune` or `dune-project` file
|
||||
- The current directory contains a `jbuild` or `jbuild-ignore` file
|
||||
- The current directory contains a `.merlin` file
|
||||
- The current directory contains a file with `.ml`, `.mli`, `.re` or `.rei` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Variable | Default | Description |
|
||||
| ---------- | --------------- | ------------------------------------------------------- |
|
||||
| `symbol` | `"🐫 "` | The symbol used before displaying the version of OCaml. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `ocaml` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[ocaml]
|
||||
symbol = "🐪 "
|
||||
```
|
||||
|
||||
## PHP
|
||||
|
||||
The `php` module shows the currently installed version of PHP.
|
||||
|
||||
Reference in New Issue
Block a user