forked from extern/nushell
nu-cmd-extra crate infrastructure in place with the Bits command as the model for adding other commands (#9327)
I wanted to get the infrastructure in place for starters for our *nu-cmd-extra* crate... The plan is to put inside here the following commands... * bits * bytes * math I thought it would be easier to do one at a time as well as get the nu-cmd-extra crate out there on crates.io for this upcoming release... Once this lands the infrastructure will be in place to move over the other noted commands for now... And then add other stuff we do NOT want to be in 1.0.
This commit is contained in:
@ -4,6 +4,9 @@ use crate::*;
|
||||
#[cfg(feature = "dataframe")]
|
||||
use nu_cmd_dataframe::*;
|
||||
|
||||
#[cfg(feature = "extra")]
|
||||
use nu_cmd_extra::*;
|
||||
|
||||
pub fn create_default_context() -> EngineState {
|
||||
let mut engine_state = nu_cmd_lang::create_default_context();
|
||||
|
||||
@ -20,6 +23,10 @@ pub fn create_default_context() -> EngineState {
|
||||
// they have to be registered before the main declarations. This helps to make
|
||||
// them only accessible if the correct input value category is used with the
|
||||
// declaration
|
||||
|
||||
#[cfg(feature = "extra")]
|
||||
add_extra_decls(&mut working_set);
|
||||
|
||||
#[cfg(feature = "dataframe")]
|
||||
add_dataframe_decls(&mut working_set);
|
||||
|
||||
@ -205,19 +212,6 @@ pub fn create_default_context() -> EngineState {
|
||||
StrUpcase
|
||||
};
|
||||
|
||||
// Bits
|
||||
bind_command! {
|
||||
Bits,
|
||||
BitsAnd,
|
||||
BitsNot,
|
||||
BitsOr,
|
||||
BitsXor,
|
||||
BitsRotateLeft,
|
||||
BitsRotateRight,
|
||||
BitsShiftLeft,
|
||||
BitsShiftRight,
|
||||
}
|
||||
|
||||
// Bytes
|
||||
bind_command! {
|
||||
Bytes,
|
||||
|
Reference in New Issue
Block a user