@@ -103,14 +103,14 @@ def command-frontmatter [commands_group, command_name] {
103103 $commands_list
104104 | get category
105105 | each { |category |
106- let usage = ($commands_list | where category == $category | get usage | str join (char newline ))
106+ let usage = ($commands_list | where category == $category | get description | str join (char newline ))
107107 $' ($category | str snake-case ): |(char newline ) ($usage )'
108108 }
109109 | str join (char newline )
110110 )
111111 let indented_usage = (
112112 $commands_list
113- | get usage
113+ | get description
114114 | each {|elt | $" ($elt )" }
115115 | str join (char newline )
116116 )
@@ -141,7 +141,7 @@ def command-doc [command] {
141141 let top = $"
142142# `($command.name )` for [($command.category )]\( /commands/categories/($command.category ).md\)
143143
144- <div class='command-title'>($command.usage | html-escape )</div>
144+ <div class='command-title'>($command.description | html-escape )</div>
145145
146146"
147147
@@ -208,11 +208,11 @@ $"## Parameters
208208"
209209 }
210210
211- let ex = $command.extra_usage
211+ let ex = $command.extra_description
212212
213- # Certain commands' extra_usage is wrapped in code block markup to prevent their code from
213+ # Certain commands' extra_description is wrapped in code block markup to prevent their code from
214214 # being interpreted as markdown. This is strictly hard-coded for now.
215- let extra_usage = if $ex == " " {
215+ let extra_description = if $ex == " " {
216216 " "
217217 } else if $command.name in [' def-env' ' export def-env' ' as-date' ' as-datetime' ansi ] {
218218$" ## Notes
@@ -266,9 +266,9 @@ $"($example.description)
266266 let sub_commands = if $one_word_cmd { scope commands | where name =~ $' ^($command.name ) ' } else { [] }
267267 let sub_commands = if $one_word_cmd and ($sub_commands | length ) > 0 {
268268 let commands = $sub_commands
269- | select name usage type
269+ | select name description type
270270 | update name {|row | $" [`($row.name )`]\( /commands/docs/($row.name | safe-path ).md\) " }
271- | upsert usage {|row | $row.usage | str replace - a ' <' ' \<' | str replace - a ' >' ' \>' }
271+ | upsert description {|row | $row.description | str replace - a ' <' ' \<' | str replace - a ' >' ' \>' }
272272 | to md -- pretty
273273 [' ' , ' ## Subcommands:' , ' ' , $commands , ' ' ] | str join (char newline )
274274 } else { ' ' }
@@ -289,7 +289,7 @@ $"($example.description)
289289 }
290290
291291 let doc = (
292- ($top + $plugin_warning + $signatures + $flags + $parameters + $in_out + $examples + $extra_usage + $sub_commands )
292+ ($top + $plugin_warning + $signatures + $flags + $parameters + $in_out + $examples + $extra_description + $sub_commands )
293293 | lines
294294 | each {|line | ($line | str trim - r ) }
295295 | str join (char newline )
0 commit comments