Rosettea / Hilbish

🌓 The Moon-powered shell! A comfy and extensible shell for Lua fans! 🌺 ✨
https://rosettea.github.io/Hilbish/
MIT License
496 stars 21 forks source link

fix: multiline input should have newline #308

Closed youkwhd closed 1 month ago

youkwhd commented 1 month ago

When multiline is needed, a newline should be added to the input, much like what other shell would do.

Before newline addition:

& echo "abc
> def"
abcdef

After newline addition:

& echo "abc
> def"
abc
def

However, there's runLuaRunner(...) call in exec.go:126 I didn't test for, might be breaking.

TorchedSammy commented 1 month ago

i intentionally removed this very early in hilbish's life (3 years ago) due to me commonly missing quotes for my commit messages (and a newline being annoying most of time, in cases like that).

if anything, you can make an addition that input ending with something like \ will include a newline if you like.

youkwhd commented 1 month ago

i see, understandable

though, knowing Hilbish is not aiming to be POSIX-Compliant, maybe Hilbish should consider making a documentation for what these different behaviors would be, it's nice for quickly knowing what differs, and what to expect in Hilbish

either way, thanks, i will close this