You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating a note the first thing I tried to do was run notes ls to show all of my existing ones, and was a little confused as to what command I was supposed to run instead.
While this means you can search with it as well, which isn't technically fully correct, it seems like a harmless alias.
Thanks for all your contributions! Seeing people get involved like this is great.
Sadly though, I'm not going to merge this one. I do agree that an ls command will be useful and is probably a common expectation, but I don't want it to just be an alias of find (as you pointed out: it's a bit weird that ls does searches) and I'm hoping to use it as part of the route to making managing trees of notes better.
I'm imagining maybe that find would return every single matching note (probably all of them as it does now), while ls would return direct matches at the given level. E.g:
> notes find
note.md
more-notes/another-note.md
more-notes/third-note.md
more-notes/yet-another-note.md
> notes ls
note.md
more-notes/
> notes ls more-notes
another-note.md
third-note.md
yet-another-note.md
That makes ls an simple effective tool for browsing your notes, and leaves find as the go-to tool for searching them. Just spitballing here, but I think that could work nicely. Does that make sense to you?
I'm going to close this for now, but feel free to open a new PR pivoting this to match the above or try out some other approaches if you'd like.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After creating a note the first thing I tried to do was run
notes lsto show all of my existing ones, and was a little confused as to what command I was supposed to run instead.While this means you can search with it as well, which isn't technically fully correct, it seems like a harmless alias.