Repository navigation
Commit f25fc7b
authored
fix: restore clip flag through fuzzy search in show command (gopasspw#3466)
When 'gopass show -c foo' triggers a fuzzy search (because 'foo' does not
exist but e.g. 'foozen' does), the -c flag was silently lost.
Root cause: findCmd() re-parsed the clip flag from the cli.Command by
calling cmd.Bool("clip"). The show command registers 'clip' as a
GenericFlag (*OptionalInt), not a BoolFlag. In urfave/cli v3,
cmd.Bool() called on a GenericFlag returns false (the zero value)
regardless of what the user passed. This false value overwrote the
clip=true that showParseArgs() had already correctly stored in the
context.
The find command has no clip flag of its own, so the block was always a
no-op for the direct 'gopass find' path. For the fuzzy-search path
(called from showHandleError), the context already carries the correct
clip state, so removing the re-parse block is the right fix.
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>1 parent 837919a commit f25fc7b
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
0 commit comments