nushell/crates/nu-engine/src
Dan Davison 649c8319e6
Add input-output types to $nu.scope.commands (#7105)
* Add input and output types to $nu.scope.commands

This commit changes the schema: instead of

command.signature: table

we now have

command.signatures: list<table>

with one signature for every input-output type pair.

* Represent signatures as a map from input_type to signature

* Sort signature entries

* Drop command name from signature tables

* Don't use "rest" as name of rest parameter; use empty string instead

* Bug fix: was creating records with repeated keys

E.g.
$nu.scope.commands | where name == 'hash sha256' | get signatures.0 | table -e
$nu.scope.commands | where name == 'transpose' | get signatures.0 | table -e
2022-11-12 14:26:20 -08:00
..
call_ext.rs Friendly error message for access beyond end (#6944) 2022-10-29 19:47:50 +02:00
column.rs table -e Fix stackoverflow (cause endless empty list) (#6847) 2022-10-22 11:52:32 -05:00
documentation.rs Refactor ansi stripping into nu-utils functions (#6966) 2022-11-05 07:49:45 +13:00
env.rs Fix environment conversions (#7092) 2022-11-11 13:13:07 +13:00
eval.rs Refactor creation of $nu.scope in eval.rs (#7104) 2022-11-11 23:20:28 +01:00
glob_from.rs Run a round of clippy --fix to fix a ton of lints (#7006) 2022-11-04 15:11:17 -05:00
lib.rs Refactor creation of $nu.scope in eval.rs (#7104) 2022-11-11 23:20:28 +01:00
scope.rs Add input-output types to $nu.scope.commands (#7105) 2022-11-12 14:26:20 -08:00