Skip to content

Commit

Permalink
Adding warning to nu_plugin_formats commands (nushell#1199)
Browse files Browse the repository at this point in the history
  • Loading branch information
TWSiO authored Jan 7, 2024
1 parent 997664c commit 87b89a6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions commands/docs/from_eml.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ usage: |

<div class='command-title'>{{ $frontmatter.formats }}</div>


::: warning
Command `from eml` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats
:::
## Signature

```> from eml {flags} ```
Expand Down
4 changes: 4 additions & 0 deletions commands/docs/from_ics.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ usage: |

<div class='command-title'>{{ $frontmatter.formats }}</div>


::: warning
Command `from ics` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats
:::
## Signature

```> from ics {flags} ```
Expand Down
4 changes: 4 additions & 0 deletions commands/docs/from_ini.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ usage: |

<div class='command-title'>{{ $frontmatter.formats }}</div>


::: warning
Command `from ini` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats
:::
## Signature

```> from ini {flags} ```
Expand Down
4 changes: 4 additions & 0 deletions commands/docs/from_vcf.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ usage: |

<div class='command-title'>{{ $frontmatter.formats }}</div>


::: warning
Command `from vcf` resides in [plugin](/book/plugins.html) [`nu_plugin_formats`](https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats
:::
## Signature

```> from vcf {flags} ```
Expand Down
6 changes: 5 additions & 1 deletion make_docs.nu
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ $"($example.description)
$'(char nl)**Tips:** Command `($command.name)` was not included in the official binaries by default, you have to build it with `--features=extra` flag(char nl)'
} else { '' }

let plugins = if $command.name in ['from ini', 'from ics', 'from eml', 'from vcf'] {
$"(char nl)::: warning(char nl)Command `($command.name)` resides in [plugin]\(/book/plugins.html) [`nu_plugin_formats`]\(https://crates.io/crates/nu_plugin_formats). To use this command, you must install/compile and register nu_plugin_formats(char nl):::(char nl)"
} else { '' }

let doc = (
($top + $signatures + $flags + $parameters + $in_out + $examples + $extra_usage + $sub_commands + $tips)
($top + $plugins + $signatures + $flags + $parameters + $in_out + $examples + $extra_usage + $sub_commands + $tips)
| lines
| each {|it| ($it | str trim -r) }
| str join (char newline)
Expand Down

0 comments on commit 87b89a6

Please sign in to comment.