feat: revealed JSON is shown formatted, and PEM certificates as what they say

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kebandClaude Opus 5.5 committed 2026-10-11 14:31:46 +02:00
1 parent 1d8a7d2842
commit ece44daadb
3 files changed
+147 -1

No files matched your search

+8 -1
View File
@@ -313,7 +313,8 @@ func (d Detail) lines(st styles.Styles) []string {
case ValueShown:
// Where the dots were, continuing under itself; the keys below.
first := true
for _, line := range strings.Split(d.value.Reveal(), "\n") {
lines, note := valueView(d.value.Reveal())
for _, line := range lines {
for _, w := range strings.Split(ansi.Hardwrap(line, max(1, inner-11), true), "\n") {
if first {
out = append(out, " "+st.Label.Render(fmt.Sprintf("%-10s", label))+" "+st.Value.Render(w))
@@ -324,6 +325,12 @@ func (d Detail) lines(st styles.Styles) []string {
}
}
var more []string
if note != "" && d.CopyKey != "" {
note += ": " + d.CopyKey + " copies it as stored"
}
if note != "" {
more = append(more, note)
}
if d.hidesIn != "" {
more = append(more, "hides in "+d.hidesIn)
}