mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 16:35:29 +02:00
Clarify Extension
section purpose
This commit is contained in:
@ -492,7 +492,6 @@ def get-extension-by-prefix [prefix: string] {
|
|||||||
| rename --column { name: command }
|
| rename --column { name: command }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def get-command-extensions [command: string] {
|
def get-command-extensions [command: string] {
|
||||||
# low-tech version of `nu-highlight`, which produces suboptimal results with unknown commands
|
# low-tech version of `nu-highlight`, which produces suboptimal results with unknown commands
|
||||||
def hl [shape: string] {
|
def hl [shape: string] {
|
||||||
@ -710,6 +709,8 @@ def build-command-page [command: record] {
|
|||||||
] | flatten)
|
] | flatten)
|
||||||
} else { [] })
|
} else { [] })
|
||||||
|
|
||||||
|
# This section documents how the command can be extended
|
||||||
|
# E.g. `open` can be extended by adding more `from ...` commands
|
||||||
let extensions = (
|
let extensions = (
|
||||||
get-command-extensions $command.name
|
get-command-extensions $command.name
|
||||||
| if ($in | is-not-empty) {
|
| if ($in | is-not-empty) {
|
||||||
|
Reference in New Issue
Block a user