Commit Graph

2120 Commits

Author SHA1 Message Date
Yehuda Katz
98c59f77b2
Merge pull request #1078 from nushell/enable_coloring_in_tokens
Remove the coloring_in_tokens feature flag
2019-12-12 13:08:35 -08:00
Yehuda Katz
e8800fdd0c Remove the coloring_in_tokens feature flag
Stabilize and enable
2019-12-12 11:34:43 -08:00
Yehuda Katz
09f903c37a
Merge pull request #1077 from nushell/implement-signature-syntax
Add Range and start Signature support
2019-12-11 21:58:09 -08:00
Yehuda Katz
57af9b5040 Add Range and start Signature support
This commit contains two improvements:

- Support for a Range syntax (and a corresponding Range value)
- Work towards a signature syntax

Implementing the Range syntax resulted in cleaning up how operators in
the core syntax works. There are now two kinds of infix operators

- tight operators (`.` and `..`)
- loose operators

Tight operators may not be interspersed (`$it.left..$it.right` is a
syntax error). Loose operators require whitespace on both sides of the
operator, and can be arbitrarily interspersed. Precedence is left to
right in the core syntax.

Note that delimited syntax (like `( ... )` or `[ ... ]`) is a single
token node in the core syntax. A single token node can be parsed from
beginning to end in a context-free manner.

The rule for `.` is `<token node>.<member>`. The rule for `..` is
`<token node>..<token node>`.

Loose operators all have the same syntactic rule: `<token
node><space><loose op><space><token node>`.

The second aspect of this pull request is the beginning of support for a
signature syntax. Before implementing signatures, a necessary
prerequisite is for the core syntax to support multi-line programs.

That work establishes a few things:

- `;` and newlines are handled in the core grammar, and both count as
  "separators"
- line comments begin with `#` and continue until the end of the line

In this commit, multi-token productions in the core grammar can use
separators interchangably with spaces. However, I think we will
ultimately want a different rule preventing separators from occurring
before an infix operator, so that the end of a line is always
unambiguous. This would avoid gratuitous differences between modules and
repl usage.

We already effectively have this rule, because otherwise `x<newline> |
y` would be a single pipeline, but of course that wouldn't work.
2019-12-11 16:41:07 -08:00
Jonathan Turner
16272b1b20
Merge pull request #1076 from jonathandturner/finish_plugin_refactor
Trying this as a workaround to the [[bin]] issue
2019-12-09 20:20:51 -08:00
Jonathan Turner
1dcbd89a89 Trying this as a workaround to the [[bin]] issue 2019-12-10 16:57:55 +13:00
Jonathan Turner
eb6ef02ad1
Merge pull request #1075 from jonathandturner/finish_plugin_refactor
Finish plugin refactor
2019-12-09 18:34:26 -08:00
Jonathan Turner
17586bdfbd Fix missing dep 2019-12-10 15:13:22 +13:00
Jonathan Turner
0e98cf3f1e Merge branch 'finish_plugin_refactor' of github.com:jonathandturner/nushell into finish_plugin_refactor 2019-12-10 13:59:44 +13:00
Jonathan Turner
e2a95c3e1d Move str and inc to core plugins 2019-12-10 13:59:13 +13:00
Jonathan Turner
5cb7df57fc
Update azure-pipelines.yml 2019-12-10 13:09:25 +13:00
Jonathan Turner
88f899d341 Move some plugins back to being core shippable plugins 2019-12-10 13:05:40 +13:00
Jonathan Turner
7d70b5feda Try to fix CI with new subcrates 2019-12-10 08:14:58 +13:00
Jonathan Turner
fd6ee03391 Remove old ValueExt 2019-12-10 07:52:01 +13:00
Jonathan Turner
9f702fe01a Move the remainder of the plugins to crates 2019-12-10 07:39:51 +13:00
Jonathan Turner
c9d9eec7f8
Merge pull request #1073 from jonathandturner/docker_wrap
Remove partial docker plugin. Embed->wrap
2019-12-08 21:08:03 -08:00
Jonathan Turner
38cbfdb8a9 Remove partial docker plugin. Embed->wrap 2019-12-09 17:41:09 +13:00
Jonathan Turner
f9b7376949
Merge pull request #1072 from jonathandturner/format_parse
Move format/parse to core commands
2019-12-08 18:26:35 -08:00
Jonathan Turner
e98ed1b43d Move format/parse to core commands 2019-12-09 15:04:13 +13:00
Jonathan Turner
251c3e103d Move format/parse to core commands 2019-12-09 14:57:53 +13:00
Jonathan Turner
d26e938436
Merge pull request #1071 from jonathandturner/fix_1068
Fix 1068
2019-12-08 12:38:10 -08:00
Jonathan Turner
dbadf9499e Fix 1068 2019-12-09 08:15:14 +13:00
Jonathan Turner
28df1559ea
Merge pull request #1070 from jonathandturner/upgrade_some_deps
Upgrade some dependencies
2019-12-08 10:19:39 -08:00
Jonathan Turner
91784218c0 Upgrade some dependencies 2019-12-09 06:56:21 +13:00
Jonathan Turner
eeec5e10c3
Merge pull request #1069 from jonathandturner/param_complete
Named param completion
2019-12-08 08:55:13 -08:00
Jonathan Turner
0515ed976c Fix panic 2019-12-09 05:36:24 +13:00
Jonathan Turner
f653992b4a A little cleanup 2019-12-08 19:42:43 +13:00
Jonathan Turner
b5f8c1cc50 param completions work now 2019-12-08 19:23:31 +13:00
Jonathan Turner
f9a46ce1e7 WIP param completions 2019-12-08 19:04:23 +13:00
Jonathan Turner
b6ba7f97fd WIP param completions 2019-12-08 18:58:53 +13:00
Jonathan Turner
7a47905f11
Merge pull request #1066 from thibran/fix-more-clippy-warnings
Fix more Clippy warnings
2019-12-07 16:10:36 -08:00
Thibaut Brandscheid
683f4c35d9 Fix more Clippy warnings
cargo clippy -- -W clippy::correctness
2019-12-07 21:04:58 +01:00
Jonathan Turner
dfa5173cf4
Merge pull request #1064 from thibran/split-table-from-list
split format/table::from_list into multiple functions
2019-12-07 09:00:14 -08:00
Thibaut Brandscheid
04b214bef6 split format/table::from_list into multiple functions 2019-12-07 14:52:52 +01:00
Jonathan Turner
37cb7fec77
Merge pull request #1063 from jonathandturner/unused_deps
Remove some unused deps
2019-12-06 23:44:52 -08:00
Jonathan Turner
8833969e4a Remove some unused deps 2019-12-07 20:23:29 +13:00
Jonathan Turner
bda238267c
Merge pull request #1062 from jonathandturner/fetch_post
Fetch/post as plugins
2019-12-06 22:46:30 -08:00
Jonathan Turner
d07dc57537 Add missing fallback case 2019-12-07 19:24:58 +13:00
Jonathan Turner
d0a2888e88 Finish adding makeshift support for to fetch/post plugins 2019-12-07 17:23:59 +13:00
Jonathan Turner
cec2eff933 Merge branch 'master' into fetch_post 2019-12-07 16:53:50 +13:00
Jonathan Turner
38b7a3e32b WIP move post/fetch to plugins 2019-12-07 16:46:05 +13:00
Jonathan Turner
9dfb6c023f
Merge pull request #1061 from thibran/fix-most-clippy-warnings
Fix most Clippy performance warnings
2019-12-06 19:26:20 -08:00
Thibaut Brandscheid
cde92a9fb9 Fix most Clippy performance warnings
command used: cargo clippy -- -W clippy::perf
2019-12-06 23:25:47 +01:00
Jonathan Turner
5622bbdd48
Merge pull request #1059 from coolshaurya/patch-1
Fix minor error in reject command docs
2019-12-06 08:13:55 -08:00
Shaurya Shubham
3d79a9c37a
Fix minor error in reject command docs 2019-12-06 17:27:14 +05:30
Jonathan Turner
a2a5b30568
Merge pull request #1058 from jonathandturner/edit_insert_core
Move edit and insert to core
2019-12-05 12:42:19 -08:00
Jonathan Turner
768adb84a4 Remove commented out region 2019-12-06 09:19:24 +13:00
Jonathan Turner
26b0250e22 Remove commented out region 2019-12-06 09:18:16 +13:00
Jonathan Turner
6893850fce Move edit and insert to core 2019-12-06 09:15:41 +13:00
Jonathan Turner
8834e6905e
Merge pull request #1055 from jonathandturner/ps_sys_crates
Extract ps and sys subcrates. Move helper methods to UntaggedValue
2019-12-04 12:24:45 -08:00