mirror of
https://github.com/nushell/nushell.git
synced 2025-05-31 07:08:22 +02:00
fix(cell-path): incorrect serialization of empty cell-paths
can round trip `$. | to nuon | from nuon`
This commit is contained in:
parent
e48ad0d531
commit
d411a1e9e6
@ -250,6 +250,10 @@ impl Display for CellPath {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Empty cell-paths are `$.` not `$`
|
||||||
|
if self.members.is_empty() {
|
||||||
|
write!(f, ".")?;
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user