mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(deno): create module (#2565)
* Add deno module * Update docs * Update src/utils.rs Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Update src/modules/deno.rs Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Update src/modules/deno.rs Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Update src/modules/deno.rs Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * Update src/modules/deno.rs Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> * run rust fmt * Use deno -V * fmt * Fix deno module * do clippy * Update src/configs/deno.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update src/modules/deno.rs Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Update docs/config/README.md Co-authored-by: David Knaack <davidkna@users.noreply.github.com> * Fix test and docs * Remove unused code * fmt * update configs * Add more tests * Update docs/config/README.md Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> Co-authored-by: Dario Vladović <d.vladimyr@gmail.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
@@ -199,6 +199,7 @@ $docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$deno\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
@@ -650,6 +651,41 @@ By default the module will be shown if any of the following conditions are met:
|
||||
format = "via [🔰 $version](bold red) "
|
||||
```
|
||||
|
||||
## Deno
|
||||
|
||||
The `deno` module shows you your currently installed version of Deno.
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `mod.ts`, `mod.js`, `deps.ts` or `deps.js` file
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------------------- | ----------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `symbol` | `"🦕 "` | A format string representing the symbol of Deno |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["mod.ts", "mod.js", "deps.ts", "deps.js"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `"green bold"` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `deno` module. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v1.8.3` | The version of `deno` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[deno]
|
||||
format = "via [🦕 $version](green bold) "
|
||||
```
|
||||
|
||||
## Directory
|
||||
|
||||
The `directory` module shows the path to your current directory, truncated to
|
||||
|
||||
Reference in New Issue
Block a user