forked from extern/nushell
5459d30a24
* Add 'expor env' dummy command * (WIP) Abstract away module exportables as Overlay * Switch to Overlays for use/hide Works for decls only right now. * Fix passing import patterns of hide to eval * Simplify use/hide of decls * Add ImportPattern as Expr; Add use env eval Still no parsing of "export env" so I can't test it yet. * Refactor export parsing; Add InternalError * Add env var export and activation; Misc changes Now it is possible to `use` env var that was exported from a module. This commit also adds some new errors and other small changes. * Add env var hiding * Fix eval not recognizing hidden decls Without this change, calling `hide foo`, the evaluator does not know whether a custom command named "foo" was hidden during parsing, therefore, it is not possible to reliably throw an error about the "foo" name not found. * Add use/hide/export env var tests; Cleanup; Notes * Ignore hide env related tests for now * Fix main branch merge mess * Fixed multi-word export def * Fix hiding tests on Windows * Remove env var hiding for now
38 lines
597 B
Rust
38 lines
597 B
Rust
mod alias;
|
|
mod def;
|
|
mod do_;
|
|
mod echo;
|
|
mod export;
|
|
mod export_def;
|
|
mod export_env;
|
|
mod for_;
|
|
mod help;
|
|
mod hide;
|
|
mod if_;
|
|
mod let_;
|
|
mod module;
|
|
mod source;
|
|
mod use_;
|
|
|
|
pub use alias::Alias;
|
|
pub use def::Def;
|
|
pub use do_::Do;
|
|
pub use echo::Echo;
|
|
pub use export::ExportCommand;
|
|
pub use export_def::ExportDef;
|
|
pub use export_env::ExportEnv;
|
|
pub use for_::For;
|
|
pub use help::Help;
|
|
pub use hide::Hide;
|
|
pub use if_::If;
|
|
pub use let_::Let;
|
|
pub use module::Module;
|
|
pub use source::Source;
|
|
pub use use_::Use;
|
|
|
|
#[cfg(feature = "plugin")]
|
|
mod register;
|
|
|
|
#[cfg(feature = "plugin")]
|
|
pub use register::Register;
|