feat: lazysecrets list shows unreadable lists as red ✗ lines, and filters by kind
This commit is contained in:
6 files changed
+197
-81
No files matched your search
@@ -17,7 +17,6 @@ import (
|
||||
"time"
|
||||
|
||||
tea "charm.land/bubbletea/v2"
|
||||
"golang.org/x/term"
|
||||
|
||||
"git.kebcloud.no/keb/lazysecrets"
|
||||
"git.kebcloud.no/keb/lazysecrets/internal/commands"
|
||||
@@ -122,8 +121,8 @@ func run() error {
|
||||
{{secrets/scope/key}}
|
||||
lazysecrets [flags] get <ref> print the value a lazysecrets:// link points at,
|
||||
for scripts: VAR=$(lazysecrets get <ref>)
|
||||
lazysecrets [flags] list [--cached] [--max-age 2m] [--format text|json]
|
||||
[--color always|never] [--icons=false] [--errors]
|
||||
lazysecrets [flags] list [--kind secret,…] [--cached] [--max-age 2m] [--format text|json]
|
||||
[--color always|never] [--icons=false] [--errors=false]
|
||||
print every source, vault and secret it can
|
||||
find, one per line, for fzf and pickers:
|
||||
what's cached at once, then what loads
|
||||
@@ -358,12 +357,7 @@ Flags:
|
||||
if d, err := config.CacheDir(); err == nil && !*demo && config.On(cfg.Storage.Cache) {
|
||||
cachePath = filepath.Join(d, "cache.json")
|
||||
}
|
||||
// Into a pipe (fzf), stderr would draw over what reads it.
|
||||
errOut := io.Discard
|
||||
if term.IsTerminal(int(os.Stdout.Fd())) {
|
||||
errOut = os.Stderr
|
||||
}
|
||||
return listCmd(providers, cachePath, timeoutFor, theme, *icons, listArgs, os.Stdout, errOut, os.Stderr)
|
||||
return listCmd(providers, cachePath, timeoutFor, theme, *icons, listArgs, os.Stdout)
|
||||
}
|
||||
if shareArgs != nil {
|
||||
// The files from a repo, the key from whichever provider it's
|
||||
|
||||
Reference in new issue
Block a user