mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 22:07:57 +02:00
WIP
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
engine::{Command, EvaluationContext},
|
||||
engine::{Command, EngineState, EvaluationContext, Stack},
|
||||
Example, IntoPipelineData, PipelineData, ShellError, Signature, Span, SyntaxShape, Value,
|
||||
};
|
||||
|
||||
@ -26,11 +26,12 @@ impl Command for SubCommand {
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
context: &EvaluationContext,
|
||||
engine_state: &EngineState,
|
||||
stack: &mut Stack,
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
into_binary(context, call, input)
|
||||
into_binary(call, input)
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
@ -85,7 +86,6 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn into_binary(
|
||||
_context: &EvaluationContext,
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use nu_engine::get_full_help;
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
engine::{Command, EvaluationContext},
|
||||
engine::{Command, EngineState, EvaluationContext, Stack},
|
||||
IntoPipelineData, PipelineData, Signature, Value,
|
||||
};
|
||||
|
||||
@ -23,12 +23,13 @@ impl Command for Into {
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
context: &EvaluationContext,
|
||||
engine_state: &EngineState,
|
||||
_stack: &mut Stack,
|
||||
call: &Call,
|
||||
_input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
Ok(Value::String {
|
||||
val: get_full_help(&Into.signature(), &[], context),
|
||||
val: get_full_help(&Into.signature(), &[], engine_state),
|
||||
span: call.head,
|
||||
}
|
||||
.into_pipeline_data())
|
||||
|
@ -1,6 +1,6 @@
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
engine::{Command, EvaluationContext},
|
||||
engine::{Command, EngineState, EvaluationContext, Stack},
|
||||
Example, IntoPipelineData, PipelineData, ShellError, Signature, Span, SyntaxShape, Value,
|
||||
};
|
||||
|
||||
@ -26,11 +26,12 @@ impl Command for SubCommand {
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
context: &EvaluationContext,
|
||||
_engine_state: &EngineState,
|
||||
_stack: &mut Stack,
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
into_filesize(context, call, input)
|
||||
into_filesize(call, input)
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
@ -113,7 +114,6 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn into_filesize(
|
||||
_context: &EvaluationContext,
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
engine::{Command, EvaluationContext},
|
||||
engine::{Command, EngineState, EvaluationContext, Stack},
|
||||
Example, IntoPipelineData, PipelineData, ShellError, Signature, Span, SyntaxShape, Value,
|
||||
};
|
||||
|
||||
@ -26,11 +26,12 @@ impl Command for SubCommand {
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
context: &EvaluationContext,
|
||||
_engine_state: &EngineState,
|
||||
_stack: &mut Stack,
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
into_int(context, call, input)
|
||||
into_int(call, input)
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
@ -89,7 +90,6 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn into_int(
|
||||
_context: &EvaluationContext,
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
|
Reference in New Issue
Block a user