diff --git a/crates/nu-command/src/filesystem/glob.rs b/crates/nu-command/src/filesystem/glob.rs index 9b1002ba7..617582f72 100644 --- a/crates/nu-command/src/filesystem/glob.rs +++ b/crates/nu-command/src/filesystem/glob.rs @@ -43,12 +43,6 @@ impl Command for Glob { "Whether to filter out symlinks from the returned paths", Some('S'), ) - .named( - "not", - SyntaxShape::List(Box::new(SyntaxShape::String)), - "DEPRECATED OPTION: Patterns to exclude from the results", - Some('n'), - ) .named( "exclude", SyntaxShape::List(Box::new(SyntaxShape::String)), @@ -147,35 +141,7 @@ impl Command for Glob { let no_files = call.has_flag("no-file"); let no_symlinks = call.has_flag("no-symlink"); - if call.has_flag("not") { - nu_protocol::report_error_new( - engine_state, - &ShellError::GenericError( - "Deprecated option".into(), - "`glob --not {list}` is deprecated and will be removed in 0.88.".into(), - Some(call.head), - Some("Please use `glob --exclude {list}` instead.".into()), - vec![], - ), - ); - } - - let not_flag: Option = call.get_flag(engine_state, stack, "not")?; - let exclude_flag: Option = call.get_flag(engine_state, stack, "exclude")?; - - let paths_to_exclude = match (not_flag, exclude_flag) { - (Some(not_flag), Some(exclude_flag)) => { - return Err(ShellError::IncompatibleParameters { - left_message: "Cannot pass --not".into(), - left_span: not_flag.span(), - right_message: "and --exclude".into(), - right_span: exclude_flag.span(), - }) - } - (Some(not_flag), None) => Some(not_flag), - (None, Some(exclude_flag)) => Some(exclude_flag), - (None, None) => None, - }; + let paths_to_exclude: Option = call.get_flag(engine_state, stack, "exclude")?; let (not_patterns, not_pattern_span): (Vec, Span) = match paths_to_exclude { None => (vec![], span),