Peter Harris

Results 31 comments of Peter Harris

You can save and restore the terminal mode with https://pkg.go.dev/github.com/peterh/liner#TerminalMode

Sorry for the late reply. The general guideline (aside from single line mode) for defaults is "what does `bash` do?" I just tested, and bash treats punctuation and whitespace the...

> I don't see a way to set the mode...? ``` sad := liner.TerminalMode() l := liner.NewLiner() happy := liner.TerminalMode() sad.ApplyMode() // shell out to another program here, remember to...

Yes, that happens with regular shells. And I hate it every time it happens. I do not want to see my input interspersed with the output of the application.

At least one other person has requested bracketed pastes. I'd be happy to look at a pull request for them.

If you're trying to build an actual shell, you don't want liner. Sorry, but liner is not (and was never intended to be) suitable for all use cases.

I would consider adding such an example if it is small and to the point. My main concern is that proper filesystem access often requires much error checking, which might...

Sorry, I misunderstood. I thought you offering to write an example for others.

There are no details here, so I can only make wild guesses. I suspect you are running docker without a TTY, so liner goes into "dumb terminal" mode. Try [docker...