mirror of
https://github.com/nushell/nushell.git
synced 2025-01-11 08:48:23 +01:00
Merge pull request #75 from nushell/prepare_for_porting
Prepare nu_commands for porting
This commit is contained in:
commit
d34e083976
TODO.md
crates/nu-command/src
2
TODO.md
2
TODO.md
@ -22,6 +22,8 @@
|
||||
- [x] Detecting `$it` currently only looks at top scope but should find any free `$it` in the expression (including subexprs)
|
||||
- [x] Signature needs to make parameters visible in scope before block is parsed
|
||||
- [x] Externals
|
||||
- [x] Modules and imports
|
||||
- [ ] Exports
|
||||
- [ ] Support for `$in`
|
||||
- [ ] Value serialization
|
||||
- [ ] Handling rows with missing columns during a cell path
|
||||
|
15
crates/nu-command/src/core_commands/mod.rs
Normal file
15
crates/nu-command/src/core_commands/mod.rs
Normal file
@ -0,0 +1,15 @@
|
||||
mod alias;
|
||||
mod def;
|
||||
mod do_;
|
||||
mod if_;
|
||||
mod let_;
|
||||
mod module;
|
||||
mod use_;
|
||||
|
||||
pub use alias::Alias;
|
||||
pub use def::Def;
|
||||
pub use do_::Do;
|
||||
pub use if_::If;
|
||||
pub use let_::Let;
|
||||
pub use module::Module;
|
||||
pub use use_::Use;
|
@ -6,8 +6,8 @@ use nu_protocol::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
where_::Where, Alias, Benchmark, BuildString, Def, Do, Each, External, For, Git, GitCheckout,
|
||||
If, Length, Let, LetEnv, Lines, ListGitBranches, Ls, Module, Table, Use,
|
||||
Alias, Benchmark, BuildString, Def, Do, Each, External, For, Git, GitCheckout, If, Length, Let,
|
||||
LetEnv, Lines, ListGitBranches, Ls, Module, Table, Use, Where,
|
||||
};
|
||||
|
||||
pub fn create_default_context() -> Rc<RefCell<EngineState>> {
|
||||
|
3
crates/nu-command/src/env/mod.rs
vendored
Normal file
3
crates/nu-command/src/env/mod.rs
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
mod let_env;
|
||||
|
||||
pub use let_env::LetEnv;
|
7
crates/nu-command/src/experimental/mod.rs
Normal file
7
crates/nu-command/src/experimental/mod.rs
Normal file
@ -0,0 +1,7 @@
|
||||
mod git;
|
||||
mod git_checkout;
|
||||
mod list_git_branches;
|
||||
|
||||
pub use git::Git;
|
||||
pub use git_checkout::GitCheckout;
|
||||
pub use list_git_branches::ListGitBranches;
|
3
crates/nu-command/src/filesystem/mod.rs
Normal file
3
crates/nu-command/src/filesystem/mod.rs
Normal file
@ -0,0 +1,3 @@
|
||||
mod ls;
|
||||
|
||||
pub use ls::Ls;
|
11
crates/nu-command/src/filters/mod.rs
Normal file
11
crates/nu-command/src/filters/mod.rs
Normal file
@ -0,0 +1,11 @@
|
||||
mod each;
|
||||
mod for_;
|
||||
mod length;
|
||||
mod lines;
|
||||
mod where_;
|
||||
|
||||
pub use each::Each;
|
||||
pub use for_::For;
|
||||
pub use length::Length;
|
||||
pub use lines::Lines;
|
||||
pub use where_::Where;
|
@ -1,44 +1,19 @@
|
||||
mod alias;
|
||||
mod benchmark;
|
||||
mod build_string;
|
||||
mod def;
|
||||
mod core_commands;
|
||||
mod default_context;
|
||||
mod do_;
|
||||
mod each;
|
||||
mod for_;
|
||||
mod git;
|
||||
mod git_checkout;
|
||||
mod if_;
|
||||
mod length;
|
||||
mod let_;
|
||||
mod let_env;
|
||||
mod lines;
|
||||
mod list_git_branches;
|
||||
mod ls;
|
||||
mod module;
|
||||
mod run_external;
|
||||
mod table;
|
||||
mod use_;
|
||||
mod where_;
|
||||
mod env;
|
||||
mod experimental;
|
||||
mod filesystem;
|
||||
mod filters;
|
||||
mod strings;
|
||||
mod system;
|
||||
mod viewers;
|
||||
|
||||
pub use alias::Alias;
|
||||
pub use benchmark::Benchmark;
|
||||
pub use build_string::BuildString;
|
||||
pub use def::Def;
|
||||
pub use default_context::create_default_context;
|
||||
pub use do_::Do;
|
||||
pub use each::Each;
|
||||
pub use for_::For;
|
||||
pub use git::Git;
|
||||
pub use git_checkout::GitCheckout;
|
||||
pub use if_::If;
|
||||
pub use length::Length;
|
||||
pub use let_::Let;
|
||||
pub use let_env::LetEnv;
|
||||
pub use lines::Lines;
|
||||
pub use list_git_branches::ListGitBranches;
|
||||
pub use ls::Ls;
|
||||
pub use module::Module;
|
||||
pub use run_external::External;
|
||||
pub use table::Table;
|
||||
pub use use_::Use;
|
||||
pub use core_commands::*;
|
||||
pub use default_context::*;
|
||||
pub use env::*;
|
||||
pub use experimental::*;
|
||||
pub use filesystem::*;
|
||||
pub use filters::*;
|
||||
pub use strings::*;
|
||||
pub use system::*;
|
||||
pub use viewers::*;
|
||||
|
3
crates/nu-command/src/strings/mod.rs
Normal file
3
crates/nu-command/src/strings/mod.rs
Normal file
@ -0,0 +1,3 @@
|
||||
mod build_string;
|
||||
|
||||
pub use build_string::BuildString;
|
5
crates/nu-command/src/system/mod.rs
Normal file
5
crates/nu-command/src/system/mod.rs
Normal file
@ -0,0 +1,5 @@
|
||||
mod benchmark;
|
||||
mod run_external;
|
||||
|
||||
pub use benchmark::Benchmark;
|
||||
pub use run_external::{External, ExternalCommand};
|
3
crates/nu-command/src/viewers/mod.rs
Normal file
3
crates/nu-command/src/viewers/mod.rs
Normal file
@ -0,0 +1,3 @@
|
||||
mod table;
|
||||
|
||||
pub use table::Table;
|
Loading…
Reference in New Issue
Block a user