Re: [PATCH v2] notes: teach the -e option to edit messages in editor
On Mon, Oct 21, 2024 at 8:00 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 12 quoted lines
> On Sun, Oct 20, 2024 at 12:03:00AM +0000, Samuel Adekunle Abraham via GitGitGadget wrote:
> > + echo "Initial note message" >expect &&
> > + echo "" >>expect &&
> > + echo "Appended edited note message" >>expect &&
>
> When you want to write multiple lines we typically use HERE docs. E.g.:
>
> cat >expect <<-EOF &&
> Initial note message
>
> Appended edited note message
> EOF
Nit: Since there are no variable interpolations inside the heredoc
body and we don't expect any, we'd normally indicate that by using
\EOF rather than EOF:
cat >expect <<-\EOF &&