mirror of
https://github.com/nushell/nushell.git
synced 2024-11-08 01:24:38 +01:00
Remove deprecated where -b
parameter (#7927)
This commit is contained in:
parent
ad14b763f9
commit
517ef7cde7
@ -2,8 +2,8 @@ use nu_engine::{eval_block, CallExt};
|
||||
use nu_protocol::ast::Call;
|
||||
use nu_protocol::engine::{Closure, Command, EngineState, Stack};
|
||||
use nu_protocol::{
|
||||
Category, Example, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData, ShellError,
|
||||
Signature, Span, Spanned, SyntaxShape, Type, Value,
|
||||
Category, Example, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData, Signature,
|
||||
Span, SyntaxShape, Type, Value,
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -38,13 +38,6 @@ not supported."#
|
||||
SyntaxShape::RowCondition,
|
||||
"Filter condition",
|
||||
)
|
||||
// TODO: Remove this flag after 0.73.0 release
|
||||
.named(
|
||||
"closure",
|
||||
SyntaxShape::Closure(Some(vec![SyntaxShape::Any, SyntaxShape::Int])),
|
||||
"use with a closure instead (deprecated: use 'filter' command instead)",
|
||||
Some('b'),
|
||||
)
|
||||
.category(Category::Filters)
|
||||
}
|
||||
|
||||
@ -59,14 +52,6 @@ not supported."#
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
|
||||
if let Some(closure) = call.get_flag::<Spanned<Closure>>(engine_state, stack, "closure")? {
|
||||
return Err(ShellError::DeprecatedParameter(
|
||||
"-b, --closure".to_string(),
|
||||
"filter command".to_string(),
|
||||
closure.span,
|
||||
));
|
||||
}
|
||||
|
||||
let closure: Closure = call.req(engine_state, stack, 0)?;
|
||||
|
||||
let span = call.head;
|
||||
|
Loading…
Reference in New Issue
Block a user