Hi Jonathan, I just tried your code and I was suprised to find that when I call the notescommand without parameters, it doesn't show the content of the notes.md file. Instead it expects me to introduce the note content itself, and it doesn't write it to file till I do Ctrl + C. Hmm... I'll find out how to fix this.
That looks like it's the intended behaviour to make it easy to write multi-line notes. If you'd rather have it just show the notes, then change the second branch of the if statement to just cat "$HOME/notes.md.
You are absolutely right Michael. I misread the comment and thought that, in absence of paramenters, the expected behavior was to display the file content. My apologies for the mistake Jonathan.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Jonathan, I just tried your code and I was suprised to find that when I call the
notes
command without parameters, it doesn't show the content of thenotes.md
file. Instead it expects me to introduce the note content itself, and it doesn't write it to file till I do Ctrl + C. Hmm... I'll find out how to fix this.That looks like it's the intended behaviour to make it easy to write multi-line notes. If you'd rather have it just show the notes, then change the second branch of the
if
statement to justcat "$HOME/notes.md
.You are absolutely right Michael. I misread the comment and thought that, in absence of paramenters, the expected behavior was to display the file content. My apologies for the mistake Jonathan.