mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 07:09:03 +02:00
* feat: update #4455, regenerate commands' docs * chore: update make_docs script
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
let vers = (version).version
|
||||
|
||||
for command in ($scope.commands | where is_custom == $false && is_external == $false) {
|
||||
for command in ($scope.commands | where is_custom == $false && is_extern == $false) {
|
||||
let top = $"---
|
||||
title: ($command.command)
|
||||
layout: command
|
||||
@ -57,7 +57,9 @@ $"($example.description)
|
||||
$example_top + $examples
|
||||
} else { "" }
|
||||
|
||||
let doc = ($top + $signature + $parameters + $examples)
|
||||
let doc = (($top + $signature + $parameters + $examples) |
|
||||
each {|it| ($it | str trim -r)} |
|
||||
str collect (char nl)) + (char nl)
|
||||
|
||||
let safe_name = ($command.command | str find-replace '\?' '' | str find-replace ' ' '_')
|
||||
$doc | save --raw $"./docs/commands/($safe_name).md"
|
||||
|
Reference in New Issue
Block a user