mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 17:05:03 +02:00
Nu glob (#4818)
* Fork glob. Normalise license holder * Fix more licenses * unwraps * bad doc test
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
use filesize::file_real_size_fast;
|
||||
use glob::Pattern;
|
||||
use nu_glob::Pattern;
|
||||
use nu_protocol::{ShellError, Span, Value};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::{DirBuilder, DirInfo, FileInfo};
|
||||
use glob::{GlobError, MatchOptions, Pattern};
|
||||
use nu_engine::CallExt;
|
||||
use nu_glob::{GlobError, MatchOptions, Pattern};
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
engine::{Command, EngineState, Stack},
|
||||
@ -103,9 +103,9 @@ impl Command for Du {
|
||||
let mut paths = match args.path {
|
||||
Some(p) => {
|
||||
let p = p.item.to_str().expect("Why isn't this encoded properly?");
|
||||
glob::glob_with(p, GLOB_PARAMS)
|
||||
nu_glob::glob_with(p, GLOB_PARAMS)
|
||||
}
|
||||
None => glob::glob_with("*", GLOB_PARAMS),
|
||||
None => nu_glob::glob_with("*", GLOB_PARAMS),
|
||||
}
|
||||
.map_err(|e| {
|
||||
ShellError::SpannedLabeledError(e.msg.to_string(), "glob error".to_string(), tag)
|
||||
|
Reference in New Issue
Block a user