Closed jievince closed 4 years ago
@peterh
Liner does not have built-in line continuation support. A user of liner could implement its own (by, for example, prompting again with a different prompt string when it sees a trailing backslash), but it's not a feature of liner per-se.
The closest thing that liner has is https://pkg.go.dev/github.com/peterh/liner?tab=doc#State.SetMultiLineMode (which is not the same thing, but it might be close enough if all you're looking for is a way to avoid the horizontally scrolling line).
Thanks for your reply. MultiLineMode is not what I want. Does liner need a builtin line continuation? I can support it.
Thanks for the offer, but I don't think we want to support builtin line continuation.
Which line continuation styles should liner support? I know you have C style continuation above, but what if someone wants to use groff style? FORTRAN style? VB style? JCL style? I'd rather not open this particular can of worms.
The application using liner knows what line continuation style it wants to support, so the support should be there.
You're right, line continuation should be done in our own program, instead of in liner
If support \
, do you have a good idea?
just like:
which equals to: