1
0
mirror of https://github.com/nushell/nushell.git synced 2025-03-30 01:28:11 +01:00
Commit Graph

623 Commits

Author SHA1 Message Date
JT
66087b01e6
Improve the 'use' and 'source' errors ()
* Improve the 'use' and 'source' errors

* Add register
2022-03-26 10:43:46 +13:00
JT
d122827a30
Fix operator precedence parser () 2022-03-25 16:23:08 +13:00
Tomoki Aonuma
90013295aa
Fix parse_string_strict() to detect unbalanced quotes properly () 2022-03-25 05:57:03 +13:00
JT
eceae26b0a
Update Cargo.toml 2022-03-23 09:39:03 +13:00
JT
ec5fd62f9f
Add licenses ()
* Add licenses

* Add licenses
2022-03-23 09:25:38 +13:00
JT
1c964cdfe7
Bump to 0.60 ()
* WIP

* semi-revert metadata change
2022-03-23 07:32:03 +13:00
JT
66e736dab4
Externals shouldn't expand aliases () 2022-03-22 11:57:48 +13:00
JT
bd5778fa24
remove the boolean vars () 2022-03-20 08:12:10 +13:00
JT
f3bb1d11d3
Add export alias and export extern ()
* export alias

* export extern
2022-03-20 07:58:01 +13:00
JT
983d115bc0
Add an alias denylist for expansions () 2022-03-19 08:03:57 +13:00
JT
7773c4cd4d
Fix single quote external interpolation () 2022-03-18 19:59:28 +13:00
JT
d0cbb2d12c
Allow expanding aliases before keywords, improve hiding ()
* Allow aliasing source

* Add test

* improve hiding

* Finish adding tests

* fix test
2022-03-18 11:35:50 +13:00
JT
0bd8664f33
Fix string interpolation escaping () 2022-03-16 05:09:30 +13:00
JT
54d9fff4f2
Revert "Alias to keywords (eg source) ()" ()
This reverts commit c023d4111a.
2022-03-13 13:38:16 -07:00
JT
c023d4111a
Alias to keywords (eg source) ()
* Allow aliasing source

* Add test
2022-03-13 11:30:37 -07:00
Jakub Žádník
c73d8d5f95
Add LIB_DIRS and PLUGIN_DIRS ()
* Add LIB_DIRS and PLUGIN_DIRS

* Put plugin dirs behind plugin feature
2022-03-12 22:12:15 +02:00
JT
12bf23faa6
Move completions to DeclId ()
* Move completions to DeclId

* fmt

* fmt
2022-03-10 09:49:02 +02:00
JT
3bdd924349
Fixes the panic when using externs + string interpolation () 2022-03-09 13:01:23 -05:00
JT
8fcf51908a
Fix expansion of row condition implied it () 2022-03-09 08:05:03 -05:00
JT
925e9f4dcb
Allow quotes in a register call () 2022-03-09 07:06:44 -05:00
JT
2ac990655e
Add support for var decl spans () 2022-03-09 04:42:19 -05:00
Darren Schroeder
35ff1076f3
add ansi escape ()
* add ansi escape

* also add the ability to escape parens

* add a few more escapes that could be problematic for the nushell lang
2022-03-07 16:39:16 -06:00
JT
1837bf775c
Default values () 2022-03-07 15:08:56 -05:00
JT
a2723c2ba4
Fix rest parsing ()
* More nuon tests, fix table print

* Fix rest type parsing
2022-03-07 11:44:27 -05:00
JT
a4a8f5df54
Add more multiline pipeline forms () 2022-03-05 08:20:13 -05:00
JT
e64ca97fe2
move scope variable into nu variable () 2022-03-04 11:36:11 -05:00
Genna Wingert
97b3e4a233
Fix aliases to known externals () 2022-03-03 14:05:55 -05:00
JT
7d0531d270
Add support for escape characters, make nuon a JSON superset ()
* WIP

* Finish adding escape support in strings

* Try to fix windows
2022-03-03 13:14:03 -05:00
Yutaro Ohno
210d25f2a0
Add into duration ()
* Add `into duration` command

* Avoid using unwrap()

* Use existing logic to parse duration strings
2022-03-03 08:16:04 -05:00
JT
96a1bf5f8d
Experiment: Allow both $true/true and $false/false ()
* Change true/false to keywords

* oops, clippy

* Both kinds of bools

* Add in some boolean variables

* disable py virtualenv test for now
2022-03-02 19:55:03 -05:00
JT
4965f4cbf4
Bump to 0.59.1 () 2022-03-01 16:55:51 -05:00
JT
a6a96b29cb
Add binary literals () 2022-02-28 18:31:53 -05:00
JT
0c3ea636fb
Add support for stderr and exit code () 2022-02-25 14:51:31 -05:00
JT
977ef66356
Fix Windows doc comments ()
* WIP windows doc comments

* WIP windows doc comments

* WIP windows doc comments

* actual fix this time
2022-02-25 13:03:39 -05:00
JT
3c62d27c28
Try again with math-like externals ()
* Try again with math-like externals

* clippy 1.59

* clippy 1.59

* clippy 1.59
2022-02-24 14:02:28 -05:00
Justin Ma
2c9d8c4818
fix: , try to fix the source -h not work issue () 2022-02-24 10:32:10 -05:00
JT
308ab91aff
Speed up the parser and nuon parser a bit more () 2022-02-24 07:58:53 -05:00
JT
4b18fdcc6e
Date literals ()
* Date literals

* update deps

* Add date+duration
2022-02-23 21:02:48 -05:00
JT
25712760ba
Add support for math-like externals () 2022-02-22 10:55:28 -05:00
JT
3e8a41fbc9
Speedup unit parse ()
* Compact nuon tables

* Speed up unit parsing a bit
2022-02-22 04:50:49 -05:00
JT
9888f8f298
Add pipeline redirection support ()
* redirection

* Remove commented-out

* fix tests

* more fixes
2022-02-21 17:22:21 -05:00
Jakub Žádník
739e403cd5
Do not set visibility to true automatically ()
Adding it by default grows the size of the visibility structure a lot.
2022-02-21 16:42:31 -05:00
Jakub Žádník
359bb6eebe
Look up predecl only in the working set ()
Previously, the parser tried to look up the predecl also in the
permanent state and if a definition with that name already existed, it
would try to update it, which is illegal.
2022-02-21 16:05:20 -05:00
Darren Schroeder
88fa40d698
rename flatshape_* to shape_* () 2022-02-21 12:27:21 -06:00
JT
6670b77b27
Fix shorthand env duplicates () 2022-02-21 12:58:04 -05:00
JT
a96f8b891e
more strict nuon handling, better nuon errors ()
* more strict nuon handling, better nuon errors

* Improve errors a bit more
2022-02-20 22:31:50 -05:00
JT
9ea5a2ecd3
Improve missing param error span () 2022-02-19 21:30:29 -05:00
Jakub Žádník
f65955ccc5
Fix wrong FlatShape name of List () 2022-02-18 18:31:28 +02:00
Jakub Žádník
bccce0ab46
Use overlay ID for module import lookup ()
* Add id to import pattern

* Finish testing importing in a block
2022-02-17 20:58:24 -05:00
JT
f5f9d56c37
Move to a standard kebab/snake style () 2022-02-17 09:55:17 -05:00
JT
6e733f49bc
Require block params ()
* Require block params

* Improve errors
2022-02-17 06:40:24 -05:00
JT
e763a8dcef
Auto-hide aliases to prevent recursion () 2022-02-15 17:36:24 -05:00
JT
56b3fc61a3
Remove statements, replaced by pipelines () 2022-02-15 14:31:14 -05:00
JT
a743db8e8f
Improve alias expansion, again () 2022-02-14 21:09:21 -05:00
JT
fbaafaa459
Make param parsing more resilient, correct missing param error () 2022-02-14 12:33:47 -05:00
JT
cc171b6ad4
Improve completions with no starting characters ()
* Improve completions with no starting characters

* Fix subexpressions, crashes, and differentiate externals
2022-02-12 10:04:10 -05:00
Jakub Žádník
328f7e92a0
Hide alias ()
* Add alias interning

Now, AliasId is used to reference aliases stored in EngineState, similar
to decls, blocks, etc.

* Fix wrong message

* Fix using decl instead of alias

* Extend also alias id visibility

* Merge also aliases from delta

* Add alias hiding code

Does not work yet but passes tests at least.

* Fix wrong alias lookup and visibility appending

* Add hide alias tests

* Fmt & Clippy

* Fix random clippy warnings in "which" command
2022-02-12 11:50:37 +02:00
JT
a16e485cce
Add support for defining known externals with their own custom completions ()
* WIP for known externals

* Now completions can work from scripts

* Add support for definiing externs

* finish cleaning up old proof-of-concept
2022-02-11 13:38:10 -05:00
JT
886ed5ab2d
Fix captures ()
* Fix rowcondition and import captures

* Only check extra blocks if not yet seen
2022-02-11 07:37:10 -05:00
JT
e6db37bc82
Fix multi-command variable captures () 2022-02-10 18:15:15 -05:00
JT
2e3b2a48ee
Fix string interpolation paren cases () 2022-02-10 11:09:08 -05:00
JT
d70d91e559 Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
Fernando Herrera
fdce6c49ab engine-q merge 2022-02-07 19:11:34 +00:00
JT
a008f1aa80
Command tests ()
* WIP command tests

* Finish marking todo tests

* update

* update

* Windows cd test ignoring
2022-02-03 21:01:45 -05:00
JT
cc1b784e3d
Add initial nu-test-support port ()
* Add initial nu-test-support port

* finish changing binary name

* Oops, these aren't Windows-safe tests
2022-02-02 15:59:01 -05:00
Jakub Žádník
2fbd182993
Allow viewing the source code of blocks ()
* Add spans to blocks and view command

* Better description; Cleanup

* Rename "view" command to "view-source"
2022-01-31 00:05:25 +02:00
JT
44821d9941
Add support for def-env and export def-env () 2022-01-29 15:45:46 -05:00
JT
04395ee05c
Allow equals to sep long flag and arg () 2022-01-27 12:20:12 +11:00
JT
6f4b7efd3e
Also set $in-variable with input ()
* Also set in-variable with input

* Fix test

* Add more tests
2022-01-27 10:46:13 +11:00
JT
83ec374995
Add -c flag and others to cmdline args ()
* Add -c flag and others to cmdline args

* finish a little bit of cleanup

* Oops, forgot file
2022-01-26 12:26:43 -05:00
JT
8ee619954d
Start support for commandline args to nu itself ()
* cmdline args wip

* WIP

* redirect working

* Add help and examples

* Only show flags in signature of more than help
2022-01-27 01:42:39 +11:00
JT
af52def93c
Fix doc comments for custom commands () 2022-01-22 13:24:47 -05:00
Darren Schroeder
0ef0277882
allow use to parse quoted paths () 2022-01-21 13:20:13 -06:00
JT
939745ad67
Support recursive functions in capture () 2022-01-21 11:39:55 -05:00
JT
45b3592739
add some more division for units () 2022-01-21 05:23:26 +11:00
Michael Angerman
d4b6b4b09a
update all cargo crates to edition 2021 () 2022-01-21 00:13:45 +11:00
JT
d2d22815fb
Improve env shorthand parse () 2022-01-20 01:58:12 +11:00
JT
49e8af8ea5
Bump to 0.43 () 2022-01-18 12:06:12 -05:00
JT
f562a4526c
Fix clippy lints ()
* Fix clippy lints

* Fix clippy lints

* Fix clippy lints
2022-01-18 23:33:28 +11:00
Onur Şahin
5fae96a6b1
Fix not equal returning error when same things are compared in some cases ()
* Fix not equal returning error when same things are compared in some cases

* Equality operators supports all type combinations
2022-01-17 01:34:20 +11:00
Jakub Žádník
3b4baa31b6
Fix ls relative path & command argument path expansion ()
* Switch to short-names when the path is a relative_path (a dir) and exit with an error if the path does not exist

* Remove debugging print line

* Show relative filenames... It does not work yet for ls ../

* Try something else to fix relative paths... it works, but the ../ code part is not very pretty

* Add canonicalize check and remove code clones

* Fix the canonicalize_with issue pointed out by kubouch. Not sure the prefix_str is what kubouch suggested

* Fix the canonicalize_with issue pointed out by kubouch. Not sure the prefix_str is what kubouch suggested

* Add single-dot expansion to nu-path

* Move value path expansion from parser to eval

Fixes 

* Remove single dot expansion from parser

It is not necessary since it will get expanded anyway in the eval.

* Fix ls to display globs with relative paths

* Use pathdiff crate to get relative paths for ls

Co-authored-by: Stefan Stanciulescu <contact@stefanstanciulescu.com>
2022-01-17 00:55:56 +11:00
JT
b78924c777
Add support for load-env () 2022-01-15 18:50:11 -05:00
JT
f9c0d223c1
Improve keyword parsing, including for ()
* Improve keyword parsing, including for

* touchup
2022-01-16 02:26:52 +11:00
Jakub Žádník
40484966c3
Make env var eval order during "use" deterministic ()
* Make env var eval order during "use" deterministic

Fixes .

* Merge delta after getting config

To make sure env vars are all in the engine state and not in the stack.
2022-01-15 08:06:32 +11:00
JT
82d90f4930
Add support for var/string interp for external names () 2022-01-13 19:17:45 +11:00
Darren Schroeder
d0f9943709
expose a few more types to custom commands (def) () 2022-01-12 09:59:07 -06:00
JT
186da4d725
Fixing captures ()
* WIP fixing captures

* small fix

* WIP

* Rewrite to proof-of-concept better parse_def

* Add missing file

* Finish capture refactor

* Fix tests

* Add more tests
2022-01-12 15:06:56 +11:00
JT
d3bfc61524
Don't panic on alias errors () 2022-01-10 13:52:01 +11:00
Jakub Žádník
733b2836f1
Cleanup parsing of use and hide commands () 2022-01-10 12:39:25 +11:00
Jakub Žádník
3b467bedd9
Add reduce command ()
* Add reduce command

* Fix example and missing test commands

* Add forgotten file
2022-01-08 02:40:40 +02:00
JT
f016a5cb72
Fix short flags with extra () 2022-01-07 08:06:54 +11:00
JT
e44789556b
Fix path external ()
* Fix external invocation/expansion

* clippy
2022-01-06 21:20:31 +11:00
JT
d39e8c15fe
Expand external command names () 2022-01-06 10:32:56 +11:00
JT
cc1ae969fe
Allow int/float to coerce in type checker () 2022-01-06 07:58:58 +11:00
JT
41dbc641cc
Some cleanups for cd/PWD ()
* Some cleanups for cd/PWD

* Some cleanups for cd/PWD
2022-01-05 11:26:01 +11:00
Darren Schroeder
4584d69715
tweak source parsing to allow quotes around string () 2022-01-05 10:44:48 +11:00
JT
8f6843c600
Move $nu.env to $env ()
* Move env from nu builtin to its own

* update samples/tests
2022-01-05 08:34:42 +11:00
JT
b6fcd46075
Some error improvements () 2022-01-04 10:14:33 +11:00
JT
cb8b7e08a5
Lex comment spans correctly () 2022-01-04 08:37:45 +11:00
JT
fe5f65a247
Highlight block and record () 2022-01-03 16:21:26 +11:00