mirror of
https://github.com/nushell/nushell.git
synced 2025-05-11 02:12:58 +00:00
* Revert "History, more test coverage improvements, and refactorings. (#3217)" This reverts commit 8fc8fc89aaf0ab40e7a149f2286eb97515f4ac9b. * 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
23 lines
585 B
Rust
23 lines
585 B
Rust
mod configuration;
|
|
mod env;
|
|
mod in_sync;
|
|
mod nu_env;
|
|
|
|
pub mod support {
|
|
use nu_test_support::{nu, playground::*, Outcome};
|
|
|
|
pub struct Trusted;
|
|
|
|
impl Trusted {
|
|
pub fn in_path(dirs: &Dirs, block: impl FnOnce() -> Outcome) -> Outcome {
|
|
let for_env_manifest = dirs.test().to_string_lossy();
|
|
|
|
nu!(cwd: dirs.root(), format!("autoenv trust \"{}\"", for_env_manifest.to_string()));
|
|
let out = block();
|
|
nu!(cwd: dirs.root(), format!("autoenv untrust \"{}\"", for_env_manifest.to_string()));
|
|
|
|
out
|
|
}
|
|
}
|
|
}
|