doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
573 stars 82 forks source link

Implement search functionality #149

Closed mchugh19 closed 2 weeks ago

mchugh19 commented 6 months ago

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

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
tessus commented 3 weeks ago

@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 commented 2 weeks ago

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.