Show and edit option values laid out as in named.conf
Values with blocks (logging, controls, ...) are shown over several lines with indentation, and edited that way: the editor grows with its content, Tab indents, Enter keeps the indentation. With a draft open, option tables show the draft's values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
27d1f9e538
commit
ad8eb3fc3d
7 files changed
+93
-5
No files matched your search
@@ -9,6 +9,7 @@ import (
|
||||
"jarl/internal/dnsname"
|
||||
"jarl/internal/engine"
|
||||
"jarl/internal/model"
|
||||
"jarl/internal/namedconf"
|
||||
"jarl/internal/render"
|
||||
"jarl/internal/rr"
|
||||
"jarl/internal/version"
|
||||
@@ -100,6 +101,9 @@ func presentOption(st *model.State, o *model.Option) api.Option {
|
||||
if c, ok := catalog.Default().Lookup(scope, o.Name); ok {
|
||||
out.Description, out.Status = c.Description, c.Status
|
||||
}
|
||||
if f := namedconf.FormatValue(o.Name, o.Value); f != o.Value {
|
||||
out.Formatted = f
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user