Skip to content
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

Configurable / templatized search output #495

Open
colearendt opened this issue Aug 11, 2020 · 2 comments
Open

Configurable / templatized search output #495

colearendt opened this issue Aug 11, 2020 · 2 comments
Labels
feature-request feature request

Comments

@colearendt
Copy link

colearendt commented Aug 11, 2020

  • Please describe the feature you would like to have.

Related to #415 and #491

I think certain search output would be nice if it were more customizable / configurable.

For instance, if I have a convention to make the first line of my note the "title" for a given book, it would be nice to always include the title in my search output.

Other times, I trust my search and would love to be thrown into a PAGER where all note content is appended together (perhaps with some clear markdown delimiters / etc.) so I can continue searching / read full context / etc.

In other cases, I might want to sort by "note create date," "last updated," or other fields that are generally not available in the CLI / UX.

  • What alternatives have you considered?

None really.

  • Any additional context

Current workflow:

  • dnote find sometopic
  • Try to guess based on context clues which note is the one I want
  • dnote view number

Proposed:

  • dnote find sometopic
  • done (depends a bit on user customization)
@sungwoncho sungwoncho added the feature-request feature request label Aug 11, 2020
@sungwoncho
Copy link
Member

What do you think about an option to print the surrounding lines? It'd be similar to grep -B and grep -A (show the number of lines before and after the match).

dnote find -S 5 sometopic # prints 5 lines before/after each match

@colearendt
Copy link
Author

colearendt commented Aug 13, 2020

I like that idea a lot! Note that grep -C 5 is equivalent to grep -B 5 -A 5, so this seems similar to -C.

These other cases seem relevant, but not sure whether that is reasonable or not:

  • sort by "note create date," "last updated," or other fields that are generally not available in the CLI / UX.
  • I don't need a ton of context, just the "title" / first line of the note. cf Note title #148

@github-actions github-actions bot added the stale label Mar 12, 2023
@dnote dnote deleted a comment from github-actions bot Mar 12, 2023
@sungwoncho sungwoncho removed the stale label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request
Projects
None yet
Development

No branches or pull requests

2 participants