Commit Graph

5177 Commits

Author SHA1 Message Date
52cf65c19e Merge pull request #1080 from andrasio/command-refactor
Separate internal and external command definitions.
2019-12-15 08:49:45 -05:00
cbbb246a6d update links to books 2019-12-15 13:56:26 +01:00
87cc6d6f01 Separate internal and external command definitions. 2019-12-15 01:24:31 -05:00
4b9ef5a9d0 Merge pull request #1079 from jonathandturner/bump_some_deps
Bump heim and necessary deps
2019-12-14 09:32:23 -08:00
31c703891a Bump heim and necessary deps 2019-12-15 02:27:14 +13:00
550bda477b Merge pull request #1060 from naufraghi/issues-972-expand-tilde-as-home-in-external-commands
Expand tilde as home in external commands
2019-12-13 08:46:08 -08:00
219b7e64cd Use shellexpand to expand ~ in external commands
Add tests for ~tilde expansion:

- test that "~" is expanded (no more "~" in output)
- ensure that "1~1" is not expanded to "1/home/user1" as it was
  before

Fixes #972

Note: the first test does not check the literal expansion because
the path on Windows is expanded as a Linux path, but the correct
expansion may come for free once `shellexpand` will use the `dirs`
crate too (https://github.com/netvl/shellexpand/issues/3).
2019-12-13 11:54:41 +01:00
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
e8800fdd0c Remove the coloring_in_tokens feature flag
Stabilize and enable
2019-12-12 11:34:43 -08:00
09f903c37a Merge pull request #1077 from nushell/implement-signature-syntax
Add Range and start Signature support
2019-12-11 21:58:09 -08:00
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
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
1dcbd89a89 Trying this as a workaround to the [[bin]] issue 2019-12-10 16:57:55 +13:00
eb6ef02ad1 Merge pull request #1075 from jonathandturner/finish_plugin_refactor
Finish plugin refactor
2019-12-09 18:34:26 -08:00
17586bdfbd Fix missing dep 2019-12-10 15:13:22 +13:00
0e98cf3f1e Merge branch 'finish_plugin_refactor' of github.com:jonathandturner/nushell into finish_plugin_refactor 2019-12-10 13:59:44 +13:00
e2a95c3e1d Move str and inc to core plugins 2019-12-10 13:59:13 +13:00
5cb7df57fc Update azure-pipelines.yml 2019-12-10 13:09:25 +13:00
88f899d341 Move some plugins back to being core shippable plugins 2019-12-10 13:05:40 +13:00
7d70b5feda Try to fix CI with new subcrates 2019-12-10 08:14:58 +13:00
fd6ee03391 Remove old ValueExt 2019-12-10 07:52:01 +13:00
9f702fe01a Move the remainder of the plugins to crates 2019-12-10 07:39:51 +13:00
c9d9eec7f8 Merge pull request #1073 from jonathandturner/docker_wrap
Remove partial docker plugin. Embed->wrap
2019-12-08 21:08:03 -08:00
38cbfdb8a9 Remove partial docker plugin. Embed->wrap 2019-12-09 17:41:09 +13:00
f9b7376949 Merge pull request #1072 from jonathandturner/format_parse
Move format/parse to core commands
2019-12-08 18:26:35 -08:00
e98ed1b43d Move format/parse to core commands 2019-12-09 15:04:13 +13:00
251c3e103d Move format/parse to core commands 2019-12-09 14:57:53 +13:00
d26e938436 Merge pull request #1071 from jonathandturner/fix_1068
Fix 1068
2019-12-08 12:38:10 -08:00
dbadf9499e Fix 1068 2019-12-09 08:15:14 +13:00
28df1559ea Merge pull request #1070 from jonathandturner/upgrade_some_deps
Upgrade some dependencies
2019-12-08 10:19:39 -08:00
91784218c0 Upgrade some dependencies 2019-12-09 06:56:21 +13:00
eeec5e10c3 Merge pull request #1069 from jonathandturner/param_complete
Named param completion
2019-12-08 08:55:13 -08:00
0515ed976c Fix panic 2019-12-09 05:36:24 +13:00
f653992b4a A little cleanup 2019-12-08 19:42:43 +13:00
b5f8c1cc50 param completions work now 2019-12-08 19:23:31 +13:00
f9a46ce1e7 WIP param completions 2019-12-08 19:04:23 +13:00
b6ba7f97fd WIP param completions 2019-12-08 18:58:53 +13:00
7a47905f11 Merge pull request #1066 from thibran/fix-more-clippy-warnings
Fix more Clippy warnings
2019-12-07 16:10:36 -08:00
683f4c35d9 Fix more Clippy warnings
cargo clippy -- -W clippy::correctness
2019-12-07 21:04:58 +01:00
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
04b214bef6 split format/table::from_list into multiple functions 2019-12-07 14:52:52 +01:00
37cb7fec77 Merge pull request #1063 from jonathandturner/unused_deps
Remove some unused deps
2019-12-06 23:44:52 -08:00
8833969e4a Remove some unused deps 2019-12-07 20:23:29 +13:00
bda238267c Merge pull request #1062 from jonathandturner/fetch_post
Fetch/post as plugins
2019-12-06 22:46:30 -08:00
d07dc57537 Add missing fallback case 2019-12-07 19:24:58 +13:00
d0a2888e88 Finish adding makeshift support for to fetch/post plugins 2019-12-07 17:23:59 +13:00
cec2eff933 Merge branch 'master' into fetch_post 2019-12-07 16:53:50 +13:00
38b7a3e32b WIP move post/fetch to plugins 2019-12-07 16:46:05 +13:00
9dfb6c023f Merge pull request #1061 from thibran/fix-most-clippy-warnings
Fix most Clippy performance warnings
2019-12-06 19:26:20 -08:00
cde92a9fb9 Fix most Clippy performance warnings
command used: cargo clippy -- -W clippy::perf
2019-12-06 23:25:47 +01:00