Skip to content

Commit

Permalink
Point out where command docs should be edited (#1042)
Browse files Browse the repository at this point in the history
  • Loading branch information
alsuren authored Sep 2, 2023
1 parent accd4d5 commit 065e584
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion make_docs.nu
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,15 @@ def generate-command [commands_group command_name] {
let doc_path = (['.', 'commands', 'docs', $'($safe_name).md'] | path join)

let frontmatter = (command-frontmatter $commands_group $command_name)
let note = "<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->"
let doc = (
$commands_group
| get $command_name
| each { |command| command-doc $command }
| str join
)

[$frontmatter $doc] | str join "\n" | save --raw --force $doc_path
[$frontmatter $note $doc] | str join "\n" | save --raw --force $doc_path
$doc_path
}

Expand Down

0 comments on commit 065e584

Please sign in to comment.