Skip to content

feat: add -exact flag for exact title/subtitle filter matching - #161

Merged
hazcod merged 2 commits into
hazcod:masterfrom
wpfleger96:wpfleger96/feat/exact-filter
Sep 22, 2026
Merged

hazcod merged 2 commits into
hazcod:masterfrom
wpfleger96:wpfleger96/feat/exact-filter

Conversation

@wpfleger96

Copy link
Copy Markdown
Contributor

Filters substring-match against title/subtitle today, so an entry titled AWS can never be uniquely selected once another entry like AWS Work exists in the vault — scripted env lookups then fail with multiple entries match filter no matter how the filter is refined. I hit this with my own vault and I think the cleanest way out is an opt-in flag.

-exact switches the filter comparison to case-insensitive equality on the same filter fields (title/subtitle) instead of substring matching. The default behavior is unchanged, and it composes with -and the same way substring filters do. It applies to every filter-taking command (list, show, pass, copy, env, ...).

Also added a test next to the existing OR/AND filter tests and a row in the README flags table.

Substring filters cannot uniquely select an entry whose title is
contained in another entry's title or subtitle (e.g. "AWS" vs
"AWS Foo"), which makes scripted lookups like the env command fail
with "multiple entries match filter". -exact switches the filter
comparison to case-insensitive equality on the same filter fields.
wpfleger96 added a commit to wpfleger96/shell-configs that referenced this pull request Sep 22, 2026
The aws Terraform workspace has only ever been planned and applied by CI
— first via the static-key GitHub secrets, then via the OIDC roles — so
no loader exported AWS credentials for local runs, and a local
`terraform plan` of the workspace had nothing to authenticate with. This
adds the terraform service account's key pair (`AWS_ACCESS_KEY_ID` /
`AWS_SECRET_ACCESS_KEY`, from the `Terraform Access Key` / `Terraform
Secret Key` fields of the Enpass **AWS** entry) to `load-tf-secrets` in
the personal profile, so it fully provisions a shell for local plans of
the aws workspace the same way it already does for the cloudflare and
homelab ones (#156 closed the same gap for cloudflare).

All three AWS-entry lookups now pass `-exact`: other vault entries
contain "AWS" in their titles, so the default substring filter is
ambiguous and fails with `multiple entries match filter`. `-exact`
requires an enpass-cli build with
[hazcod/enpass-cli#161](hazcod/enpass-cli#161) —
currently the fork's `dev` build; machines on the stock v1.12.0 release
will fail these three lookups with `flag provided but not defined:
-exact` until that lands in a pinned release (they already fail today
with the ambiguity error, so nothing regresses).
@hazcod
hazcod merged commit 39fd6fa into hazcod:master Sep 22, 2026
5 checks passed
@hazcod

hazcod commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Thank you @wpfleger96 !

wpfleger96 added a commit to wpfleger96/enpass-cli that referenced this pull request Sep 27, 2026
* wpfleger96/fix/windows-release-build:
  fix(release): build Windows targets with mingw and add Windows clipboard
  Update Go base image version to 1.27 (hazcod#162)
  build(deps): bump golang.org/x/crypto from 0.51.0 to 0.52.0 (hazcod#160)
  feat: add -exact flag for exact title/subtitle filter matching (hazcod#161)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants