mirror of
https://github.com/nushell/nushell
synced 2024-12-25 12:33:17 +00:00
Remove deprecated where -b
parameter (#7927)
This commit is contained in:
parent
ad14b763f9
commit
517ef7cde7
1 changed files with 2 additions and 17 deletions
|
@ -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 a new issue