forked from extern/nushell
$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
This commit is contained in:
parent
65980c7beb
commit
2ab5803f00
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user