mirror of
https://github.com/nushell/nushell
synced 2024-12-28 14:03:09 +00:00
c42b588782
* 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
16 lines
517 B
Rust
16 lines
517 B
Rust
use crate::filesystem::filesystem_shell::{FilesystemShell, FilesystemShellMode};
|
|
use crate::shell::shell_manager::ShellManager;
|
|
|
|
use parking_lot::Mutex;
|
|
use std::error::Error;
|
|
use std::sync::atomic::AtomicUsize;
|
|
use std::sync::Arc;
|
|
|
|
pub fn basic_shell_manager() -> Result<ShellManager, Box<dyn Error>> {
|
|
Ok(ShellManager {
|
|
current_shell: Arc::new(AtomicUsize::new(0)),
|
|
shells: Arc::new(Mutex::new(vec![Box::new(FilesystemShell::basic(
|
|
FilesystemShellMode::Cli,
|
|
)?)])),
|
|
})
|
|
}
|