Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement search functionality #149

Closed
wants to merge 5 commits into from
Closed

Implement search functionality #149

wants to merge 5 commits into from

Conversation

mchugh19
Copy link

Attempts to close #114
Where get would display and error on multiple matches, search returns them all. With no additional arguments it lists the entry names. Using --raw works as expected to expected to display this as a json list. While --full displays the whole entry.

Adds new search command

  • returns list of entries
  • case insensitive searching

Modifies current get behavior to also search note content for matches

Never written rust before, so feedback is super welcome.

$ rbw search --help
Search for entries

Usage: rbw search [OPTIONS] <TERM> [USER]

Arguments:
  <TERM>  Search term to locate entries
  [USER]  Username of the entry to display

Options:
      --folder <FOLDER>  Folder name to search in
      --full             Display the full entry in addition to the name
      --raw              Display output as JSON
  -h, --help             Print help

Allow get and search to find matches in notes

Signed-off-by: Christian McHugh <mchugh19@hotmail.com>
Signed-off-by: Christian McHugh <mchugh19@hotmail.com>
Signed-off-by: Christian McHugh <mchugh19@hotmail.com>
Signed-off-by: Christian McHugh <mchugh19@hotmail.com>
Signed-off-by: Christian McHugh <mchugh19@hotmail.com>
@tessus
Copy link

tessus commented Jun 16, 2024

@doy may I ask whether you intend to merge this? This change looks like a no-brainer to me. It doesn't change existing functionality, but adds to it.

I just need to know whether I have to retain my own fork. It seems that this project might be dead. e.g. what happens if someone opens a PR that adds support for attachments?

Btw, this project is awesome. I never liked the bw cli client. However, since it can use attachments it is the only way, if you want to use bw for ssh-agent keys. I still hope someone adds attachment support to this project. ;-)

@doy
Copy link
Owner

doy commented Jun 20, 2024

thanks for the patch! i implemented this in a different way here 0d393e4, but let me know if this doesn't work the way you expect, or if you would like additional features.

@doy doy closed this Jun 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve "rbw get" search
3 participants