From 708fee535c4c97573417212828fa77badc337b55 Mon Sep 17 00:00:00 2001 From: Access Date: Wed, 16 Nov 2022 16:15:19 +0800 Subject: [PATCH] fix: ls not show pattern error (#7143) Log: fix pattern error show in ls command --- crates/nu-command/src/filesystem/ls.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-command/src/filesystem/ls.rs b/crates/nu-command/src/filesystem/ls.rs index c29a4b9a6..debb2d1a4 100644 --- a/crates/nu-command/src/filesystem/ls.rs +++ b/crates/nu-command/src/filesystem/ls.rs @@ -165,8 +165,8 @@ impl Command for Ls { if paths_peek.peek().is_none() { return Err(ShellError::GenericError( format!("No matches found for {}", &path.display().to_string()), - "".to_string(), - None, + "Pattern, file or folder not found".to_string(), + Some(p_tag), Some("no matches found".to_string()), Vec::new(), ));