mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
deprecate str escape-glob command (#12018)
# Description After some iteration on globbing rules, I don't think `str escape-glob` is needed # User-Facing Changes ```nushell ❯ let f = "[ab]*.nu" ❯ $f | str escape-glob Error: × str escape-glob is deprecated ╭─[entry #1:1:6] 1 │ $f | str escape-glob · ───────┬─────── · ╰── if you are trying to escape a variable, you don't need to do it now ╰──── help: Remove `str escape-glob` call [[]ab[]][*].nu ``` # Tests + Formatting NaN # After Submitting NaN
This commit is contained in:
parent
f24877ba08
commit
65e5abaa3e
1 changed files with 10 additions and 0 deletions
|
@ -59,6 +59,16 @@ impl Command for SubCommand {
|
|||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
nu_protocol::report_error_new(
|
||||
engine_state,
|
||||
&ShellError::GenericError {
|
||||
error: "str escape-glob is deprecated".into(),
|
||||
msg: "if you are trying to escape a variable, you don't need to do it now".into(),
|
||||
span: Some(call.head),
|
||||
help: Some("Remove `str escape-glob` call".into()),
|
||||
inner: vec![],
|
||||
},
|
||||
);
|
||||
let cell_paths: Vec<CellPath> = call.rest(engine_state, stack, 0)?;
|
||||
let cell_paths = (!cell_paths.is_empty()).then_some(cell_paths);
|
||||
let args = Arguments { cell_paths };
|
||||
|
|
Loading…
Reference in a new issue