-
-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full text search (case insensitive) with "-contains" #740
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some tests to confirm this functionality works as expected? At a glance, this looks good to me, though. It's a pretty clean implementation of the feature.
Done and thanks! |
Hi, @empireshades. Thank you for the PR! Thanks for taking the initiative to submit it. This is looking good. Just a few notes:
|
Here's a great post about the pitfalls of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really close. I added a few notes for changes.
Thank you!
Thanks for the feedback @wren. Please see my comments inline below.
Will do
Will do
A search function should be quick and easy to use, something that a single letter (such as "-c"), would help facilitate. I've been using this fork multiple times per day for the past year and if I had to type out a full word (beyond say 4 characters), I definitely would not have picked it up in the first place. I can start an issue for this but also don't want this to get blocked in more discussion. Thoughts?
I'm sold. Will do
Makes sense. Will do. |
Yup, I totally agree. I just want to make sure that we implement for all the switches at the the same time to make sure we have a comprehensive look at the switches (e.g. we have more than one flag that starts with the same letter, etc). In order to make it go quicker, if you want to suggest what each letter should be in the issue itself, it'll expedite the process. |
What about |
@alichtman We can talk about the single line flags in a separate issue. For the longer flag, I want to keep grep reserved for if/when we implement actual grep. This PR doesn't have most of the functionality that people expect from grep, so I think |
If grep gets implemented, I'd be fine with dropping the 'contains' functionality. I pretty much use this as a 'grep -i' replacement. |
Please take a look at the updates as I believe I took care of everything you requested except for suggesting single letter flags as a new issue. |
Hi! I'll take a look at this on Tuesday. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thank you! 💯
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Similar to #470 which got stale while waiting for python 2.7 compatibility review, and addresses issue #463 (full text search). This is a pull request to add full title and body (case-insensitive) search functionality using an argument "-S". Structurally similar to the way the tag, date searches work. Searching test has been created as well to verify functionality against the "basic" example journal.
Checklist