forked from extern/nushell
Paths can be displayed as strings.
This commit is contained in:
parent
f61144006f
commit
11ef007491
@ -127,7 +127,7 @@ pub fn config(
|
||||
let path = config::default_path_for(&configuration)?;
|
||||
|
||||
return Ok(stream![Tagged::from_simple_spanned_item(
|
||||
Value::string(path.to_string_lossy()),
|
||||
Value::Primitive(Primitive::Path(path)),
|
||||
span
|
||||
)]
|
||||
.from_input_stream());
|
||||
|
@ -558,6 +558,7 @@ impl Value {
|
||||
Value::Primitive(Primitive::Decimal(x)) => Ok(format!("{}", x)),
|
||||
Value::Primitive(Primitive::Int(x)) => Ok(format!("{}", x)),
|
||||
Value::Primitive(Primitive::Bytes(x)) => Ok(format!("{}", x)),
|
||||
Value::Primitive(Primitive::Path(x)) => Ok(format!("{}", x.display())),
|
||||
// TODO: this should definitely be more general with better errors
|
||||
other => Err(ShellError::string(format!(
|
||||
"Expected string, got {:?}",
|
||||
|
Loading…
Reference in New Issue
Block a user