mirror of
https://github.com/nushell/nushell.git
synced 2025-05-06 11:04:24 +02:00
Merge pull request #75 from nushell/prepare_for_porting
Prepare nu_commands for porting
This commit is contained in:
commit
d34e083976
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] 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] Signature needs to make parameters visible in scope before block is parsed
|
||||||
- [x] Externals
|
- [x] Externals
|
||||||
|
- [x] Modules and imports
|
||||||
|
- [ ] Exports
|
||||||
- [ ] Support for `$in`
|
- [ ] Support for `$in`
|
||||||
- [ ] Value serialization
|
- [ ] Value serialization
|
||||||
- [ ] Handling rows with missing columns during a cell path
|
- [ ] 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::{
|
use crate::{
|
||||||
where_::Where, Alias, Benchmark, BuildString, Def, Do, Each, External, For, Git, GitCheckout,
|
Alias, Benchmark, BuildString, Def, Do, Each, External, For, Git, GitCheckout, If, Length, Let,
|
||||||
If, Length, Let, LetEnv, Lines, ListGitBranches, Ls, Module, Table, Use,
|
LetEnv, Lines, ListGitBranches, Ls, Module, Table, Use, Where,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn create_default_context() -> Rc<RefCell<EngineState>> {
|
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 core_commands;
|
||||||
mod benchmark;
|
|
||||||
mod build_string;
|
|
||||||
mod def;
|
|
||||||
mod default_context;
|
mod default_context;
|
||||||
mod do_;
|
mod env;
|
||||||
mod each;
|
mod experimental;
|
||||||
mod for_;
|
mod filesystem;
|
||||||
mod git;
|
mod filters;
|
||||||
mod git_checkout;
|
mod strings;
|
||||||
mod if_;
|
mod system;
|
||||||
mod length;
|
mod viewers;
|
||||||
mod let_;
|
|
||||||
mod let_env;
|
|
||||||
mod lines;
|
|
||||||
mod list_git_branches;
|
|
||||||
mod ls;
|
|
||||||
mod module;
|
|
||||||
mod run_external;
|
|
||||||
mod table;
|
|
||||||
mod use_;
|
|
||||||
mod where_;
|
|
||||||
|
|
||||||
pub use alias::Alias;
|
pub use core_commands::*;
|
||||||
pub use benchmark::Benchmark;
|
pub use default_context::*;
|
||||||
pub use build_string::BuildString;
|
pub use env::*;
|
||||||
pub use def::Def;
|
pub use experimental::*;
|
||||||
pub use default_context::create_default_context;
|
pub use filesystem::*;
|
||||||
pub use do_::Do;
|
pub use filters::*;
|
||||||
pub use each::Each;
|
pub use strings::*;
|
||||||
pub use for_::For;
|
pub use system::*;
|
||||||
pub use git::Git;
|
pub use viewers::*;
|
||||||
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;
|
|
||||||
|
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