pimterry / notes

:pencil: Simple delightful note taking, with more unix and less lock-in.
https://github.com/pimterry/notes
MIT License
1.24k stars 82 forks source link

Add cat command #45

Closed tardypad closed 6 years ago

tardypad commented 6 years ago

There are some types of notes which are meant to be viewed most of time and edited only rarely It's inconvenient to have to open an editor just to see them so I've added this show command to display the content of a note in the standard output

I believe everything needed is there: code, completion, test, doc I have made to play nicely with pipes like the open command

tardypad commented 6 years ago

I've renamed the command to cat I thought of it initially but then some command were not following this schema too like search and open so I went for show (which sounds more explicit than cat) but actually I just realized that there is no dedicated commands linked to those previous ones. So overall, naming this one cat is indeed the most consistent choice.

I've fixed the typos you mentioned and grouped the code as well. I thought it would be more complex than this, that's why I didn't do it in the first place, but in the end it looks fine.