From 2ab5803f0031ed6afe6f85cfecf7757c92ccb064 Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Mon, 13 Jan 2020 17:41:18 +0100 Subject: [PATCH] $it: add conversion from Path for external commands (#1210) * $it: add conversion from Path for external commands (#1203) * Replace PathBuf::to_str with to_string_lossy --- src/commands/classified/external.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/classified/external.rs b/src/commands/classified/external.rs index 338f48202..98eec6c97 100644 --- a/src/commands/classified/external.rs +++ b/src/commands/classified/external.rs @@ -88,6 +88,10 @@ async fn run_with_iterator_arg( value: UntaggedValue::Primitive(Primitive::Line(s)), .. } => Ok(s.clone()), + Value { + value: UntaggedValue::Primitive(Primitive::Path(p)), + .. + } => Ok(p.to_string_lossy().to_string()), _ => { let arg = args.iter().find(|arg| arg.contains("$it")); if let Some(arg) = arg {