Commit Graph

401 Commits

Author SHA1 Message Date
Jakub Žádník
6595c06598 Relax panic into error
Convert the panic when declaration cannot find predeclaration into an
error. This error is already covered and reported in the predeclaration
phase.
2021-10-02 03:42:35 +03:00
JT
3567bbbf32
Merge pull request #80 from nushell/early_help
add ps and early help
2021-10-02 10:59:58 +13:00
JT
c5e9ff5f14 add ps and early help 2021-10-02 10:53:13 +13:00
Jakub Žádník
2c1b074bdc Add test for double def 2021-10-02 00:21:08 +03:00
Jakub Žádník
fb0f83e574 Disallow hiding the same def twice; Add tests
Tests got removed after rebase.
2021-10-02 00:12:30 +03:00
Jakub Žádník
891d79d2aa Fmt and misc fixes after rebase 2021-10-01 23:30:56 +03:00
Jakub Žádník
25b05dec9e Fix panic on double def; Tests; Double def error
* Fixes a panic with defining two commands with the same name caused by
  declaration not found after predeclaration.
* Adds a new error if a custom command is defined more than once in one
  block.
* Add some tests
2021-10-01 23:25:24 +03:00
Jakub Žádník
2af8116f50 Fix hiding logic; Fix hiding with predecls
* Hiding logic is simplified and fixed so you can hide and unhide the
  same def repeatedly.
* Separates predeclared ids into its own data structure to protect them
  from hiding. Otherwise, you could hide the predeclared variable and
  the actual def would panic.
2021-10-01 23:24:57 +03:00
Jakub Žádník
aa06a71e1f Move new commands to the new structure 2021-10-01 23:24:57 +03:00
Jakub Žádník
8ed6afe1e5 Fix tests failing without export 2021-10-01 23:24:57 +03:00
Jakub Žádník
244289c901 Add missing file 2021-10-01 23:24:57 +03:00
Jakub Žádník
7488254cca Implement a rough version of 'hide'
'hide' command is used to undefine custom commands
2021-10-01 23:24:54 +03:00
Jakub Žádník
3cbf99053f Throw an error if using export outside of module 2021-10-01 23:21:30 +03:00
Jakub Žádník
93521da9d8 Add 'export def' command 2021-10-01 23:21:28 +03:00
Jakub Žádník
561feff365 Introduce 'export' keyword 2021-10-01 23:19:39 +03:00
Jakub Žádník
1b89ccf25b Add comment 2021-10-01 23:19:39 +03:00
JT
5b3b74ebec
Merge pull request #79 from kubouch/disable-raw-mode
Disable crossterm raw mode
2021-10-02 06:01:48 +13:00
Jakub Žádník
a16144baf1 Disable crossterm raw mode
Without this change, the output of panic messages by miette would ignore
newlines and become unreadable.
2021-10-01 19:42:23 +03:00
JT
5a5205d5d9
Merge pull request #78 from nushell/sys
add sys command
2021-10-01 19:58:57 +13:00
JT
503939dcbe add sys command 2021-10-01 19:53:47 +13:00
JT
000db46618
Merge pull request #77 from nushell/record_view
add a vertical record view
2021-10-01 19:07:03 +13:00
JT
d6e24cceb4 add a vertical record view 2021-10-01 19:01:22 +13:00
JT
99666829e0
Merge pull request #76 from nushell/from_json
Add 'from json'
2021-10-01 18:26:49 +13:00
JT
db3e9efc4b fix warnings 2021-10-01 18:20:25 +13:00
JT
3e232a5db8 Add 'from json' 2021-10-01 18:11:49 +13:00
JT
d34e083976
Merge pull request #75 from nushell/prepare_for_porting
Prepare nu_commands for porting
2021-09-30 07:27:56 +13:00
JT
8250b44ce5 moved commands 2021-09-30 07:25:05 +13:00
JT
f0d5e2dcf1 Prepare nu_commands for porting 2021-09-30 07:17:51 +13:00
JT
125c8c82c3
Update TODO.md 2021-09-28 12:40:08 +13:00
JT
3b134a1ae2
Merge pull request #73 from nushell/forgiving_def_parse
More forgiving def parse
2021-09-27 14:06:51 +13:00
JT
84d0e0a059 More forgiving def parse 2021-09-27 14:03:50 +13:00
JT
0a48bc973d
Merge pull request #72 from nushell/import_patterns
Add import lists
2021-09-27 13:32:36 +13:00
JT
0108a935ed add import lists 2021-09-27 13:23:22 +13:00
JT
5ccbf4df67
Merge pull request #71 from kubouch/fix-module-error
Fix wrong error span
2021-09-27 10:28:21 +13:00
Jakub Žádník
9ee4dc49ee Fix wrong error span 2021-09-27 00:02:20 +03:00
JT
756269ee8d
Merge pull request #70 from nushell/import_patterns
Add support for module imports
2021-09-27 07:47:50 +13:00
JT
abb0d7bd22 Add support for module imports 2021-09-27 07:39:19 +13:00
JT
47421e9ca7
Merge pull request #69 from kubouch/simple-module
Primitive module implementation
2021-09-27 05:14:23 +13:00
Jakub Žádník
3f8f3ecf9a Fmt 2021-09-26 14:12:39 +03:00
Jakub Žádník
f57f7b2def Allow adding definitions from module into scope 2021-09-26 13:53:52 +03:00
Jakub Žádník
9e176674a5 Start parsing 'use'; Add Use command 2021-09-26 13:25:52 +03:00
Jakub Žádník
57a07385ac Add leftover Module command file 2021-09-26 13:25:37 +03:00
Jakub Žádník
12cf1a8f83 Allow adding module blocks to engine state 2021-09-26 12:12:32 +03:00
Jakub Žádník
e9f1575924 Add a module command 2021-09-26 01:59:18 +03:00
JT
1015ea814c
Merge pull request #68 from nushell/list_table2
improve table for lists
2021-09-26 07:37:49 +13:00
JT
abac7e3795 improve table for lists 2021-09-26 07:07:37 +13:00
JT
22c6ed4718
Merge pull request #66 from elferherrera/table
Table as string output
2021-09-26 07:00:59 +13:00
JT
3421a8b58b
Merge pull request #67 from nushell/revert-65-list_table
Revert "improve table for lists"
2021-09-26 06:59:59 +13:00
JT
75510b172a
Revert "improve table for lists" 2021-09-26 06:57:26 +13:00
JT
04a8280d51
Merge pull request #65 from nushell/list_table
improve table for lists
2021-09-26 06:56:29 +13:00