Commit Graph

198 Commits

Author SHA1 Message Date
JT
c6383874e9
Try removing debuginfo for ci builds (#5549)
* Try removing debuginfo for ci builds

* oops, wrong inherits

* extra flag

* nextest doesn't support --profile in the same way

* try to allow for a ci-specific target

* Oops, run more tests
2022-05-16 16:02:11 +12:00
JT
374757f286
Bump to the 0.62.1 dev version (#5473) 2022-05-08 08:38:12 +12:00
JT
d306b834ca
Bump to 0.62 (#5422) 2022-05-04 09:01:27 +12:00
JT
96f8691c8d
More escaping/unescaping fixes (#5403) 2022-05-02 09:49:31 +12:00
Herlon Aguiar
4d7b86f278
nu-cli: added tests for file completions (#5232)
* nu-cli: added tests for file completions

* test adding extra sort

* Feature/refactor completion options (#5228)

* Copy completion filter to custom completions

* Remove filter function from completer

This function was a no-op for FileCompletion and CommandCompletion.
Flag- and VariableCompletion just filters with `starts_with` which
happens in both completers anyway and should therefore also be a no-op.
The remaining use case in CustomCompletion was moved into the
CustomCompletion source file.

Filtering should probably happen immediately while fetching completions
to avoid unnecessary memory allocations.

* Add get_sort_by() to Completer trait

* Remove CompletionOptions from Completer::fetch()

* Fix clippy lints

* Apply Completer changes to DotNuCompletion

* add os to $nu based on rust's understanding (#5243)

* add os to $nu based on rust's understanding

* add a few more constants

Co-authored-by: Richard <Tropid@users.noreply.github.com>
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2022-04-20 16:54:00 +12:00
JT
5bf1c98a39
Move to dev version 0.61.1 (#5206) 2022-04-16 09:29:30 +12:00
JT
4566c904d0
Bump 0.61 (#5166) 2022-04-13 05:42:26 +12:00
Reilly Wood
58f395989a
Remove unused dependencies (#5145)
* Remove unused packages from base Cargo.toml

* Remove unused crossterm_winapi from nu-cli

* Remove unused dependencies from nu-system

* Remove unused dependencies from nu-test-support
2022-04-10 09:14:55 +12:00
Michel Alexandre Salim
6ed033737d
Include license text in all crates (#5094)
* Include license text in all crates

Three crates already have license texts, so I'm keeping them, but
symlinking the `LICENSE` from the top level to the rest of the crate
directories. This works as long as `cargo publish` is done on a Unix-y
system and not Windows.

Also bump the copyright year to end in 2022.

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>

* Replace symlinks

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2022-04-08 10:47:13 +02:00
JT
82e3bb0f38
Bump nushell to 0.60.1 (#4987) 2022-03-27 16:18:47 +13:00
JT
1c964cdfe7
Bump to 0.60 (#4892)
* WIP

* semi-revert metadata change
2022-03-23 07:32:03 +13:00
JT
ff3dffd813
Nu glob (#4818)
* Fork glob. Normalise license holder

* Fix more licenses

* unwraps

* bad doc test
2022-03-13 11:30:27 -07:00
JT
4965f4cbf4
Bump to 0.59.1 (#4689) 2022-03-01 16:55:51 -05:00
JT
3c62d27c28
Try again with math-like externals (#4629)
* Try again with math-like externals

* clippy 1.59

* clippy 1.59

* clippy 1.59
2022-02-24 14:02:28 -05:00
Joseph T. Lyons
4f367a59de
Strip trailing whitespace in files (#4575)
* Strip trailing whitespace in rs files

* Strip trailing whitespace in toml files

* Strip trailing whitespace in md files

* Strip trailing whitespace in nu files
2022-02-21 08:38:15 -05:00
Jakub Žádník
c7c427723b
Test support fixes (#4517)
* Fix failing pipeline()

The `skip(1)` was there likely to remove the welcome message.

* Fix typo

* Fix nu! test macro to enter cwd correctly

Nushell's current working directory is determined primarily by the PWD
environment variable.
2022-02-18 00:23:04 +02: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 (#922)
* 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 (#913)
* 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
JT
49e8af8ea5
Bump to 0.43 (#4264) 2022-01-18 12:06:12 -05:00
JT
f562a4526c
Fix clippy lints (#4262)
* Fix clippy lints

* Fix clippy lints

* Fix clippy lints
2022-01-18 23:33:28 +11:00
JT
62011b6bcc
Bump to 0.42 (#4234) 2021-12-28 20:56:59 +11:00
JT
610e3911f6
Bump to 0.41 (#4187) 2021-12-08 06:21:00 +13:00
JT
c08e145501
Fix clippy warnings (#4176) 2021-12-03 07:05:38 +13:00
ahkrr
e06df124ca
upgrading dependencies (#4135)
* upgrade dependencies
num-bigint 0.3.1 -> 0.4.3
bigdecimal-rs 0.2.1 -> bigdecimal 0.3.0
s3hander 0.7 -> 0.7.5
bat 0.18 -> 0.18, default-features = false

* upgrade arboard 1.1.0 -> 2.0.1

* in polars use comfy-table instead of prettytable-rs
the last release of prettytable-rs was `0.8.0 Sep 27, 2018`
and it uses `term 0.5` as a dependency

* upgrade dependencies

* upgrade trash -> 2.0.1

Co-authored-by: ahkrr <alexhk@protonmail.com>
2021-11-20 07:11:11 -06:00
JT
2590fcbe5c
Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
JT
2b06ce27d3
Bump to 0.39 (#4097) 2021-10-27 08:36:41 +13:00
JT
e1ebd461d2
Bump to 0.28 (#4064) 2021-10-06 06:35:25 +13:00
Squirrel
4e0d7bc77c
Less deps (#4038)
* compiles on nightly now. (breaking change)

* less deps

* Switch over to new resolver

(it's been stable for a while.)

* let's leave num-format for another PR
2021-09-28 07:17:00 +13:00
JT
8581bec891
bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
JT
1d80a68f4c
bump to 0.37 (#4006) 2021-09-15 06:44:24 +12:00
Marcin Puc
51c74eebd0
Add general refactorings (#3996) 2021-09-10 10:44:22 +12:00
Jakub Žádník
d95375d494
nu-path crate refactor (#3730)
* Resolve rebase artifacts

* Remove leftover dependencies on removed feature

* Remove unnecessary 'pub'

* Start taking notes and fooling around

* Split canonicalize to two versions; Add TODOs

One that takes `relative_to` and one that doesn't.
More TODO notes.

* Merge absolutize to and rename resolve_dots

* Add custom absolutize fn and use it in path expand

* Convert a couple of dunce::canonicalize to ours

* Update nu-path description

* Replace all canonicalize with nu-path version

* Remove leftover dunce dependencies

* Fix broken autocd with trailing slash

Trailing slash is preserved *only* in paths that do not contain "." or
"..". This should be fixed in the future to cover all paths but for now
it at least covers basic cases.

* Use dunce::canonicalize for canonicalizing

* Alow cd recovery from non-existent cwd

* Disable removed canonicalize functionality tests

Remove unused import

* Break down nu-path into separate modules

* Remove unused public imports

* Remove abundant cow mapping

* Fix clippy warning

* Reformulate old canonicalize tests to expand_path

They wouldn't work with the new canonicalize.

* Canonicalize also ~ and ndots; Unify path joining

Also, add doc comments in nu_path::expansions.

* Add comment

* Avoid expanding ndots if path is not valid UTF-8

With this change, no lossy path->string conversion should happen in the
nu-path crate.

* Fmt

* Slight expand_tilde refactor; Add doc comments

* Start nu-path integration tests

* Add tests TODO

* Fix docstring typo

* Fix some doc strings

* Add README for nu-path crate

* Add a couple of canonicalize tests

* Add nu-path integration tests

* Add trim trailing slashes tests

* Update nu-path dependency

* Remove unused import

* Regenerate lockfile
2021-08-28 15:59:09 +03:00
JT
7fe05b8296
bump to 0.36.1 (#3972) 2021-08-27 20:48:58 +12:00
JT
991a4801b1
Bump to 0.36 (#3963) 2021-08-25 06:01:17 +12:00
soumil-07
cd814851da
Use bigdecimal-rs patch (#3905)
* Use bigdecimal-rs patch

* fix nu-serde's bigdecimal dependency
2021-08-07 09:27:19 +12:00
JT
bc682066d8
Bump to 0.35 (#3884) 2021-08-03 20:01:09 +12:00
Darren Schroeder
23ba01d89c
add performance metrics for measuring startup time (#3854)
* add performance metrics for measureing startup time

* removed some comments

* update so tests pass

* update default.toml for tests, merged main

* fix clippy lints

* wording changes
2021-07-29 18:52:40 -05:00
JT
226739d13f
Bump to 0.34.1 (#3835) 2021-07-25 22:58:33 +12:00
Nathan Thomas
e514204db0
Fix wrong path separator (#3829) 2021-07-24 08:42:50 -05:00
Darren Schroeder
0f9e55dac6
Revert "Support other variables than PATH in pathvar (#3791)" (#3827)
This reverts commit f9f39c0a1c.
2021-07-23 09:03:28 -05:00
Jakub Žádník
f9f39c0a1c
Support other variables than PATH in pathvar (#3791)
* Fix swapped PATH env var separators

* Support pathvar to manipulate other vars than PATH

* Add tests for pathvar and its subcommands

* Fix PATH env name for Windows

Seems like Windows uses PATH as well.

Co-authored-by: Jakub Žádník <jakub.zadnik@tuni.fi>
2021-07-23 19:11:56 +12:00
JT
71f4ea9d76
Bump to 0.34.0 (#3766) 2021-07-14 05:57:41 +12:00
Nathan Thomas
a3f119e0bd
Add pathvar command (#3670)
* Add pathvar command

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Add pathvar command to context

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Add pathvar reset command

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Update help message

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Remove insert command

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Remove unused import

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Remove insert mod

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Support for windows path separator

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Clear clippy errors

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Remove empty file

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Formatting

Signed-off-by: nathom <nathanthomas707@gmail.com>
2021-06-25 15:58:37 +12:00
JT
edbc828fc3
Bump to 0.33.1 (#3671) 2021-06-23 19:57:41 +12:00
JT
55cab9eb4f
Bump to 0.33 (#3667) 2021-06-22 17:22:33 +12:00
JT
d9d956e54f
Fix issue in external subexpression paths (#3642)
* Fix issue in external subexpression paths

* new clippy dropped

* clippy
2021-06-18 07:59:58 +12:00
JT
383e874166
Fix a bunch of future clippy warnings (#3586)
* Fix a bunch of future clippy warnings

* Fix a bunch of future clippy warnings
2021-06-10 07:08:12 +12:00
JT
7d78f40bf6
Bump to 0.32.1 (#3553) 2021-06-04 19:07:50 +12:00
JT
df526f73be
Bump to 0.32 (#3521)
* Bump to 0.32

* Bump to 0.32
2021-06-01 08:14:50 +12:00
JT
d79a3130b8
Make the default int an i64 (#3428)
* Make the default int an i64

* fmt

* Fix random integer

* Treat pids as i64 for now
2021-05-14 20:35:09 +12:00
JT
9b8b1bad57
Don't insert PATH variable on Windows (#3422)
* Don't insert PATH variable on Windows

* Simplify fix

* Just centralize the var

* Add a message about why we have to workaround the issue
2021-05-13 15:03:49 +12:00
JT
2bb23c57df
Bump to 0.31.1 (#3411) 2021-05-12 15:06:50 +12:00
JT
48128c9db6
Bump to 0.31.0 (#3405) 2021-05-11 16:44:52 +12:00
JT
599c43ce04
bump to 0.30.1 (#3348) 2021-04-22 21:07:54 +12:00
JT
0fc9b6cfa2
Bump to 0.30 (#3333)
* Bump to 0.30

* fix test
2021-04-20 18:34:10 +12:00
Leonhard Kipp
ac070ae942
Refactor/config commands (#3265)
* Use ctx.configs in all config commands

* Remove all setting/accessing of  vars.("config-path")

* Add tests

* Add comment

* Reload cfg on remove

* Hypocratic ws change

* Use history_path in hist_or_default

* Make clippy happy

* Fix rebase stuff

* Fix clippy lint
2021-04-09 18:03:12 +12:00
Jonathan Turner
42fac722bb
Bump to 0.29.2 (#3274)
* Bump to 0.29.2

* Fix test
2021-04-07 08:14:06 +12:00
Andrés N. Robalino
00acf22f5f
account for startup commands in the scope. (#3261)
* Revert "Impl one configurable function to run scripts (#3242)"
* pass config startup.
2021-04-04 00:14:58 -05:00
Jonathan Turner
06b154f4b2
Bump to 0.29.1 (#3232)
* Bump to 0.29.1

* fix test
2021-03-31 20:13:40 +13:00
Jonathan Turner
4faaa5310e
Bump to 0.29 (#3230)
* Bump to 0.29

* fix test
2021-03-30 22:35:21 +13:00
Andrés N. Robalino
8fc8fc89aa
History, more test coverage improvements, and refactorings. (#3217)
Improvements overall to Nu. Also among the changes here, we can also be more confident towards incorporating `3041`. End to end tests for checking envs properly exported to externals is not added here (since it's in the other PR)

A few things added in this PR (probably forgetting some too)

* no writes happen to history during test runs.
* environment syncing end to end coverage added.
* clean up / refactorings few areas.
* testing API for finer control (can write tests passing more than one pipeline)
* can pass environment variables in tests that nu will inherit when running.

* No longer needed.

* no longer under a module. No need to use super.
2021-03-27 00:08:03 -05:00
Jonathan Turner
7e184b58b2
Fix warnings for Rust 1.51 (#3214)
* Fix warnings for Rust 1.51

* More fixes

* More fixes
2021-03-26 21:26:57 +13:00
Andrés N. Robalino
d2213d18fa
Playground infraestructure (tests, etc) additions. (#3179)
* Playground infraestructure (tests, etc) additions.

A few things to note:

* Nu can be started with a custom configuration file (`nu --config-file /path/to/sample_config.toml`). Useful for mocking the configuration on test runs.
* When given a custom configuration file Nu will save any changes to the file supplied appropiately.
* The `$nu.config-path` variable either shows the default configuration file (or the custom one, if given)
* We can now run end to end tests with finer grained control (currently, since this is baseline work, standard out) This will allow to check things like exit status, assert the contents with a format, etc)

* Remove (for another PR)
2021-03-15 02:26:30 -05:00
nibon7
82b6300dcb
fix: cargo test failed with --release (#3183) (#3184)
Signed-off-by: nibon7 <nibon7@163.com>
2021-03-15 16:59:04 +13:00
Jonathan Turner
22ae962b57
Bump to 0.28 (#3149) 2021-03-09 23:40:17 +13:00
Andrés N. Robalino
0b71e45072
Preserve order when serializing/deserialize json by default. (#3126) 2021-03-04 01:35:13 -05:00
Jonathan Turner
aa6c6120f6
Bump to 0.27.2 (#3109)
* Bump to 0.27.2

* Fix clippy and test
2021-02-26 17:55:25 +13:00
Andrés N. Robalino
7dc1d6a350
Extract .nu-env tests and more granularity (#3078)
The autoenv logic mutates environment variables in the running session as
it operates and decides what to do for trusted directories containing `.nu-env`
files. Few of the ways to interact with it were all in a single test function.

We separate out all the ways that were done in the single test function to document
 it better. This will greatly help once we start refactoring our way out from setting
 environment variables this way to just setting them to `Scope`.

This is part of an on-going effort to keep variables (`PATH` and `ENV`)
in our `Scope` and rely on it for everything related to variables.

We expect to move away from setting (`std::*`) envrironment variables in the current
running process. This is non-trivial since we need to handle cases from vars
coming in from the outside world, prioritize, and also compare to the ones
we have both stored in memory and in configuration files.

Also to send out our in-memory (in `Scope`) variables properly to external
programs once we no longer rely on `std::env` vars from the running process.
2021-02-18 20:24:27 -05:00
Jonathan Turner
deff1aa63b
Bump to 0.27.1 (#3073) 2021-02-18 18:54:48 +13:00
Jonathan Turner
039f223b53
Bump to 0.27 (#3063) 2021-02-16 19:20:05 +13:00
Jonathan Turner
6f17662a4e
Update some deps (#3011) 2021-02-06 09:54:54 +13:00
Jonathan Turner
c83aea3c89
Bump to 0.26.1 (#3008) 2021-02-05 19:38:04 +13:00
Jonathan Turner
388973e9ab
Bump to 0.26.0 (#2974) 2021-01-26 23:07:08 +13:00
Jonathan Turner
7d07881d96
Bump to 0.25.2 (#2908) 2021-01-12 07:50:53 +13:00
Jonathan Turner
5e72b2a797
Bump to 0.25.1 for the hotfix release (#2870) 2021-01-06 15:16:08 +13:00
Jonathan Turner
d297199d7c
Bump to 0.25.0 (#2860) 2021-01-05 18:10:24 +13:00
Jonathan Turner
ac578b8491
Multiline scripts part 2 (#2795)
* Begin allowing comments and multiline scripts.

* clippy

* Finish moving to groups. Test pass

* Keep going

* WIP

* WIP

* BROKEN WIP

* WIP

* WIP

* Fix more tests

* WIP: alias starts working

* Broken WIP

* Broken WIP

* Variables begin to work

* captures start working

* A little better but needs fixed scope

* Shorthand env setting

* Update main merge

* Broken WIP

* WIP

* custom command parsing

* Custom commands start working

* Fix coloring and parsing of block

* Almost there

* Add some tests

* Add more param types

* Bump version

* Fix benchmark

* Fix stuff
2020-12-18 20:53:49 +13:00
Jonathan Turner
5183fd25bb
Bump version (#2792) 2020-12-16 09:13:18 +13:00
Jonathan Turner
a30837298d
Bump version (#2791) 2020-12-16 06:30:50 +13:00
Stan Zhang
83c874666a
Date utility commands (#2780)
* updated & added date related commands based on the new design

* added proper error handling when date format string is invalid

* fixed format issue

* fixed an issue caused due to the change in primitive Date type

* added `date list-timezone` command to list all supported time zones and updated `date to-timezone` accordingly
2020-12-12 12:18:03 -06:00
Jonathan Turner
e299e76fcf
Bump to 0.23 (#2766) 2020-11-25 07:22:27 +13:00
Jonathan Turner
cb8491cfee
Bump to 0.22 (#2726) 2020-11-04 07:31:41 +13:00
Jonathan Turner
a6fdee4a51
bump to 0.21.1 (#2702)
* bump to 0.21.1

* bump trash version
2020-10-26 21:10:06 +13:00
Andrés N. Robalino
b6d19cc9fa
Move command changes. Refactorings. (#2683)
Continuing on anchoring and improvements on Nu's overall internal commands (#2635).
`move column` sub command has been turned into the command `move` since
we use it to move exclusively columns. Examples added as well.

Fixed it to carry along any anchor locations that might be in place if
table to be moved originates from other sources.
2020-10-20 04:07:13 -05:00
Andrés N. Robalino
791e07650d
ColumnPath creation flexibility. (#2674) 2020-10-15 17:25:17 -05:00
Chris Gillespie
808fe496a6
Fix typo in test support crate description (#2669) 2020-10-14 04:45:32 -05:00
Jonathan Turner
770e5d89f2
Bump to 0.21 (#2663) 2020-10-14 06:19:09 +13:00
Chris Gillespie
38bdb053d2
Add tests for get_data_by_key (#2658)
* Add test for get_data_by_key

* Apply same order for ValuExt impl

* Nothing helper for tests

* Use get_data_by_key from ValueExt
2020-10-12 22:46:58 -05:00
Andrés N. Robalino
973a8ee8f3
Allow config to work with column paths. (#2653)
Nu has many commands that allow the nuño to customize behavior such
as UI and behavior. Today, coloring can be customized, the line editor,
and other things. The more options there are, the higher the complexity
in managing them.

To mitigate this Nu can store configuration options as nested properties.

But to add and edit them can be taxing. With column path support we can
work with them easier.
2020-10-08 20:04:19 -05:00
Jonathan Turner
ebba89ea31
Bump to 0.20 (#2588) 2020-09-22 19:54:46 +12:00
Andrés N. Robalino
0178b53289
Core nu plugin load capability. (#2544)
We introduce the `plugin` nu sub command (`nu plugin`) with basic plugin
loading support. We can choose to load plugins from a directory. Originally
introduced to make integration tests faster (by not loading any plugins on startup at all)
but `nu plugin --load some_path ; test_pipeline_that_uses_plugins_just_loaded` does not see it.

Therefore, a `nu_with_plugins!` macro for tests was introduced on top of nu`s `--skip-plugins`
switch executable which is set to true when running the integration tests that use the `nu!` macro now..
2020-09-14 09:07:02 -05:00
Darren Schroeder
a63a5adafa
remove unused dependencies (#2520)
* remove unused dependencies

* moved umask to cfg(unix)

* changed Inflector to inflector, hoping it fixes the issue.

* roll back Inflector

* removed commented out deps now that everything looks good.
2020-09-09 13:57:51 -05:00
Darren Schroeder
2eb4f8d28a
updated dependencies (#2517) 2020-09-09 10:35:45 +12:00
Jonathan Turner
882cf74137
Bump to 0.19.0 (#2483) 2020-09-02 15:37:06 +12:00
Jonathan Turner
da4d24d082
Bump to 0.18.2. Move starship external. (#2345)
* Bump to 0.18.2. Move starship external.

* Fix failing test
2020-08-14 07:02:45 +12:00
Jonathan Turner
87d71604ad
Bump to 0.18.1 (#2335) 2020-08-12 15:59:28 +12:00
Jonathan Turner
2ad07912d9
Bump to 0.18 (#2325) 2020-08-11 18:44:53 +12:00
Jonathan Turner
ba81278ffd
Remove build.rs and nu-build (#2282) 2020-08-01 09:21:10 +12:00