forked from extern/nushell
Added BigInt handling to the delimited file format for the 'to' command (#4034)
Co-authored-by: patrick <patrick@spol42069.hitronhub.home>
This commit is contained in:
parent
b3d8666db0
commit
4e6327de1d
@ -136,7 +136,8 @@ fn to_string_tagged_value(v: &Value) -> Result<String, ShellError> {
|
||||
| Primitive::Boolean(_)
|
||||
| Primitive::Decimal(_)
|
||||
| Primitive::FilePath(_)
|
||||
| Primitive::Int(_),
|
||||
| Primitive::Int(_)
|
||||
| Primitive::BigInt(_),
|
||||
) => as_string(v),
|
||||
UntaggedValue::Primitive(Primitive::Date(d)) => Ok(d.to_string()),
|
||||
UntaggedValue::Primitive(Primitive::Nothing) => Ok(String::new()),
|
||||
|
@ -698,6 +698,7 @@ pub fn as_string(value: &Value) -> Result<String, ShellError> {
|
||||
UntaggedValue::Primitive(Primitive::Int(x)) => Ok(x.to_string()),
|
||||
UntaggedValue::Primitive(Primitive::Filesize(x)) => Ok(x.to_string()),
|
||||
UntaggedValue::Primitive(Primitive::FilePath(x)) => Ok(x.display().to_string()),
|
||||
UntaggedValue::Primitive(Primitive::BigInt(x)) => Ok(x.to_string()),
|
||||
UntaggedValue::Primitive(Primitive::ColumnPath(path)) => Ok(path
|
||||
.iter()
|
||||
.map(|member| match &member.unspanned {
|
||||
|
Loading…
Reference in New Issue
Block a user