rhysd / notes-cli

Small markdown note taking CLI app playing nicely with your favorite editor and other CLI tools
MIT License
218 stars 26 forks source link

We should have an easier way to open and edit notes #7

Open arafat-ar13 opened 4 years ago

arafat-ar13 commented 4 years ago

I have just checked out the app and it's awesome. But I'm on Windows and use PowerShell so I don't have access to commands like less and grep which are available on Linux or Mac.

So while I can create new notes according to different categories and tag them, I am having difficulties in selecting specific note and editing it. The notes ls --oneline command displays my notes correctly but with the argument -e, it only opens the most recent note for me to edit. This doesn't give me any option to select a note and open that. I can narrow it down a little further when I specify --tag=sometag and then that note is open, but PROVIDED that that is the only note with that tag.

So my main request here is why don't we have the ability to open notes according to their name? Maybe a --nameargument would do just fine. I know using grep is one of the recommended ways to go. But for us Windows users (and other users too) there should be a simpler method like selecting specific task with --name. Here is a possible example: notes ls --name=sometask -e

blaggacao commented 4 years ago

If such thing should be of the scope of this implementation, then it should be inspired by the notes ls | fzf | xargs -o $EDITOR workflow under a notes edit subcommand, whith optional specification of the same search queries (--tags, --cats) as in the list sub command.

Optionally to be used with an argument notes edit /category/name.. (TAB completion)

Maybe semantically better notes view (because strictly speaking you first view, and then eventually edit)

But then, there is: https://github.com/rhysd/notes-cli#extend-notes-command-by-adding-new-subcommands