[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3226: here-document syntax inference and completion is broken
From: |
Lars Ingebrigtsen |
Subject: |
bug#3226: here-document syntax inference and completion is broken |
Date: |
Wed, 16 Oct 2019 03:40:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Paul Nienaber <phox@phox.ca> writes:
> While I use here-strings more than here-docs by a huge margin I would
> also like to not negatively impact people using the former a lot, so
> in light of that I'd like to suggest going with Stefan's suggestion,
> importantly because it's also totally valid to trip on '<<-' and
> '<<[A-Za-z]', whereas here-strings are always only '<<<'. Also
> '<<EOF' is the overwhelmingly more common form that I see vs '<< EOF'.
The additional wrinkle here is that sh-mode will insert the
sh-here-document-word when expanding.
So if the user types <<X, what should that be expanded to? Just
appending EOF would be bad, and replacing the X with EOF would be bad,
and expanding to
foo <<X
X
would be bad, and prompting for what to expand to would be pretty
pointless, too.
I guess is "X" is "E", then expanding to
foo <<EOF
EOF
would be nice, though. I think I'll add that.
But I didn't see any way to make the <<[^<] thing work in any intuitive
way. If anybody has an idea here, I'm all ears.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no