1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-08 18:37:07 +02:00
Commit Graph

16 Commits

Author SHA1 Message Date
JT
fe5055cf29 Relax groups and blocks to output at pipeline level ()
* Relax groups and blocks to output at pipeline level

* Fix up tests and add ignore command
2021-06-18 13:04:51 +12:00
JT
d9d956e54f Fix issue in external subexpression paths ()
* Fix issue in external subexpression paths

* new clippy dropped

* clippy
2021-06-18 07:59:58 +12:00
JT
9b8b1bad57 Don't insert PATH variable on Windows ()
* 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
d05c48a1d7 Fix : Pick up nu-env if cd with shortcuts ()
* Fix autoenv not set when using implied cd

* Fix wrong return value

* Fix windows no value returned err
2021-04-28 17:31:22 +12:00
JT
0fc9b6cfa2 Bump to 0.30 ()
* Bump to 0.30

* fix test
2021-04-20 18:34:10 +12:00
42fac722bb Bump to 0.29.2 ()
* Bump to 0.29.2

* Fix test
2021-04-07 08:14:06 +12:00
073e5727c6 Switch to "engine-p" ()
* WIP

* WIP

* first builds

* Tests pass
2021-04-06 11:19:43 -05:00
06b154f4b2 Bump to 0.29.1 ()
* Bump to 0.29.1

* fix test
2021-03-31 20:13:40 +13:00
c42b588782 Refactor nu-cli/env* ()
* Revert "History, more test coverage improvements, and refactorings. ()"

This reverts commit 8fc8fc89aa.

* Add tests

* Refactor .nu-env

* Change logic of Config write to logic of read()

* Fix reload always appends to old vars

* Fix reload always takes last_modified of global config

* Add reload_config in evaluation context

* Reload config after writing to it in cfg set / cfg set_into

* Add --no-history to cli options

* Use --no-history in tests

* Add comment about maybe_print_errors

* Get ctrl_exit var from context.global_config

* Use context.global_config in command "config"

* Add Readme in engine how env vars are now handled

* Update docs from autoenv command

* Move history_path from engine to nu_data

* Move load history out of if

* No let before return

* Add import for indexmap
2021-03-31 18:52:34 +13:00
4faaa5310e Bump to 0.29 ()
* Bump to 0.29

* fix test
2021-03-30 22:35:21 +13:00
8fc8fc89aa History, more test coverage improvements, and refactorings. ()
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
d2213d18fa Playground infraestructure (tests, etc) additions. ()
* 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
c13fe83784 Rename count to length ()
* update docs to refer to length instead of count

* rename count to length

* change all occurrences of 'count' to 'length' in tests

* format length command
2021-03-14 10:46:40 +13:00
22ae962b57 Bump to 0.28 () 2021-03-09 23:40:17 +13:00
aa6c6120f6 Bump to 0.27.2 ()
* Bump to 0.27.2

* Fix clippy and test
2021-02-26 17:55:25 +13:00
7dc1d6a350 Extract .nu-env tests and more granularity ()
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