9 Commits

Author SHA1 Message Date
Reilly Wood
95d4922e44
Make stream info visible to users in describe (#7589)
Closes #7581.

After this PR, `describe` shows `(stream)` next to input that arrived at
`describe` as a `ListStream`:
```bash
〉ls | describe
table<name: string, type: string, size: filesize, modified: date> (stream)
〉[1 2 3] | each {|i| $i} | describe
list<int> (stream)
```

`describe` must collect all items of the stream to display type
information for lists and tables. If users need to avoid collecting
input, they can use the `-n`/`--no-collect` flag:

```bash
〉[1 2 3] | each {|i| $i} | describe --no-collect
stream
```
2023-01-03 21:08:05 -08:00
Dan Davison
df94052180
Declare input and output types of commands (#6796)
* Add failing test that list of ints and floats is List<Number>

* Start defining subtype relation

* Make it possible to declare input and output types for commands

- Enforce them in tests

* Declare input and output types of commands

* Add formatted signatures to `help commands` table

* Revert SyntaxShape::Table -> Type::Table change

* Revert unnecessary derive(Hash) on SyntaxShape

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-11-10 10:55:05 +13:00
Stefan Holderbach
3b8deb9ec7
Add search terms for describe (#5644) 2022-05-26 08:11:45 -05:00
Reilly Wood
7e97be1dd4
Handle custom values in describe command (#5248) 2022-04-20 16:59:53 +12:00
JT
0c3ea636fb
Add support for stderr and exit code (#4647) 2022-02-25 14:51:31 -05:00
JT
90f6b6aedf
Simplify describe (#933) 2022-02-04 14:51:36 -05:00
JT
020ad24b25
"maybe text codec" version 2 (#871)
* Add a RawStream that can be binary or string

* Finish up updating the into's
2022-01-28 13:32:33 -05:00
JT
857ecda050
Let describe know about binary (#662) 2022-01-04 14:05:24 +11:00
JT
e01e73cb67
Add debug and describe (#351)
* Add debug and describe

* Fix test
2021-11-19 18:00:29 +13:00