Allow config to work with column paths. (#2653)

Nu has many commands that allow the nuño to customize behavior such
as UI and behavior. Today, coloring can be customized, the line editor,
and other things. The more options there are, the higher the complexity
in managing them.

To mitigate this Nu can store configuration options as nested properties.

But to add and edit them can be taxing. With column path support we can
work with them easier.
This commit is contained in:
Andrés N. Robalino
2020-10-08 20:04:19 -05:00
committed by GitHub
parent 1159d3365a
commit 973a8ee8f3
11 changed files with 361 additions and 72 deletions

View File

@ -92,6 +92,11 @@ impl UntaggedValue {
matches!(self, UntaggedValue::Table(_))
}
/// Returns true if this value represents a row
pub fn is_row(&self) -> bool {
matches!(self, UntaggedValue::Row(_))
}
/// Returns true if this value represents a string
pub fn is_string(&self) -> bool {
matches!(self, UntaggedValue::Primitive(Primitive::String(_)))