* Revert "History, more test coverage improvements, and refactorings. (#3217)"
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
* 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)
* Move run_script to engine
* Add which dep and feature to engine
* Change unwrap to expect
* Add wasm specification
* Remove which from default, add specification correctly
* Add nu-platform-specifics
* Move is_external_cmd to platform_specifics
* Add is_external_cmd to host and use it instead of nu_platform directly
* Clean up if else logic in is_external_cmd
* Bump nu-platform-specifics version
* Pass context to print_err
* Commit cargo.lock
* Move print functions to own module inside nu-engine
* Hypocratic change to run windows-nightly again
* Add import for Ordering
* Move printing of error to host
* Move platform specific which functionality to basic host
* Allow no use of cmd_name
* Fix windows compile issue
For now the trash doesn't work because the trash-support flag isn't enabled in nu-engine
crate, so make it work by adding this flag.
Signed-off-by: Tw <wei.tan@intel.com>
Co-authored-by: Tw <wei.tan@intel.com>
* move basic_shell_manager to nu-engine
* move basic_evaluation_context to nu-engine
* fix failing test in feature which commands/classified/external.rs
We split off the evaluation engine part of nu-cli into its own crate. This helps improve build times for nu-cli by 17% in my tests. It also helps us see a bit better what's the core engine portion vs the part specific to the interactive CLI piece.
There's more than can be done here, but I think it's a good start in the right direction.