diff --git a/cli/src/config/colors.toml b/cli/src/config/colors.toml index 79c748a4b87..9e2042c7ebe 100644 --- a/cli/src/config/colors.toml +++ b/cli/src/config/colors.toml @@ -87,3 +87,10 @@ "op_log current_operation id" = "bright blue" "op_log current_operation user" = "yellow" # No bright yellow, see comment above "op_log current_operation time" = "bright cyan" + +"node" = { bold = true } +"node elided" = { fg = "bright black" } +"node working_copy" = { fg = "green" } +"node immutable" = { fg = "bright cyan" } +"node conflict" = { fg = "red" } +"node normal" = { bold = false } diff --git a/cli/src/config/templates.toml b/cli/src/config/templates.toml index 4a82ae15b3a..a65b9be760a 100644 --- a/cli/src/config/templates.toml +++ b/cli/src/config/templates.toml @@ -165,3 +165,66 @@ if(hidden, ) ) ''' + +'label_log_node(content)' = ''' +label("node", + coalesce( + if(!self, label("elided", content)), + if(immutable, label("immutable", content)), + if(conflict, label("conflict", content)), + if(current_working_copy, label("working_copy", content)), + label("normal", content), + ) +) +''' + +'label_op_log_node(content)' = ''' +label("node", + coalesce( + if(current_operation, label("working_copy", content)), + label("normal", content), + ) +) +''' + +builtin_log_node = ''' +label_log_node( + coalesce( + if(!self, "~"), + if(current_working_copy, "@"), + if(immutable, "◆"), + if(conflict, "×"), + "○", + ) +) +''' + +builtin_log_node_ascii = ''' +label_log_node( + coalesce( + if(!self, "~"), + if(current_working_copy, "@"), + if(immutable, "#"), + if(conflict, "x"), + "o", + ) +) +''' + +builtin_op_log_node = ''' +label_op_log_node( + coalesce( + if(current_operation, "@"), + "○", + ) +) +''' + +builtin_op_log_node_ascii = ''' +label_op_log_node( + coalesce( + if(current_operation, "@"), + "o", + ) +) +'''