add doc show, enhance search, add jsonpath to search and doc show

This commit is contained in:
T. von Dein
2026-05-22 13:50:17 +02:00
parent 89e2498aad
commit 98a577f68a
10 changed files with 348 additions and 52 deletions

View File

@@ -285,9 +285,9 @@ func (data *Table) Addheaders(headers ...string) {
for idx, header := range headers {
switch data.Mode {
case "json", "yaml":
data.Headers[idx] = strings.ToLower(header)
data.Headers[idx] = strings.ReplaceAll(strings.ToLower(header), " ", "_")
default:
data.Headers[idx] = bold(strings.ToUpper(header))
data.Headers[idx] = bold(strings.ReplaceAll(strings.ToUpper(header), " ", "-"))
}
}
}