app/vlogscli: preserve less output

This simplifies logs' investigation, since it allows copying some text from the previous query output
This commit is contained in:
Aliaksandr Valialkin 2024-10-01 21:46:33 +02:00
parent 3634fefc64
commit 456aeda605
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -48,7 +48,7 @@ func readWithLess(r io.Reader) error {
if err != nil {
return fmt.Errorf("cannot find 'less' command: %w", err)
}
p, err := os.StartProcess(path, []string{"less", "-F"}, &os.ProcAttr{
p, err := os.StartProcess(path, []string{"less", "-F", "-X"}, &os.ProcAttr{
Env: append(os.Environ(), "LESSCHARSET=utf-8"),
Files: []*os.File{pr, os.Stdout, os.Stderr},
})