Angoll / KPass

KeepassXC integration with Alfred
Apache License 2.0
54 stars 7 forks source link

Nested password entries #29

Closed ccolic closed 1 year ago

ccolic commented 2 years ago

Hi

I setup my keepass database and searching for entries kind of works, but entries which are nested more than 3 folders deep are not shown.

Example:

I enter: kpass git

The gitlab entry will be shown, the github entry will not appear at all.

Root -> Web -> gitlab.com Root -> Web -> Productivity -> github.com

Does anyone have similar issues?

Thanks

nmajin commented 2 years ago

Same for me as well...I don't want to flatten them all and not have then organized in their own folders either :(

futuralogic commented 2 years ago

I don't think this issue is linked to the depth of the entry. I think it has to do with how Alfred is matching what you type.

The default Alfred match mode for this workflow is to search for exact text starting from the beginning or whitespace.

You can play with the behavior in the Workflow to see if what you're experiencing is along the same lines, or not.

Open Alfred's prefs. Open the "Workflows" tab. Open the "KPass" workflow. Right/context click the "kpass script filter" (top left icon in the workspace) Select "Configure Object..." from the context menu.

In the middle of the window that comes up there is a line that starts with "Language" that specifies /bin/bash... At the end of that row there is a checkbox and "Alfred filters results" along with a small 3 dot circle icon... Click the 3 dot circle icon... Match mode defaults to "Exact from start or whitespace"

Change it to something else - I found "Word matching - any order" and "Word matching - sequential" to both work better - I'm still playing with the results. I'm currently using "any order".

Make the change. Click "Close". Then "Save" on the workflow. Now close out of Alfred's prefs and see how it behaves.


In summary, I think because "github.com" starts right after a forward-slash, Alfred doesn't "match" this in the default matching mode the author specified. However, when we make the match mode more fuzzy, the github entry should show up.


@ccolic your question spurred me to research this further as I had similar symptoms - but it could be an entirely separate issue.

Angoll commented 2 years ago

@ccolic @futuralogic thanks for your comments.

The listing of the database is using the keepassxc-cli search function (#27) in early releases I used to use the keepassxc-cli ls -R to list all entries and let alfred to decide the best way to search over all the entries.

Try to execute the keepassxc-cli search on a Terminal with your search text and see if it returns what you are looking for. If the correct entries are not returned then is something related to the kepassxc-li engine, otherwise it should be something on how Alfred is matching the keywords.

You can also try to use the keepassxc-cli ls -R bug depending on the number of entries can have an impact when loading the database.

Hope that helps you to find the issues of your use cases.