mirror of
https://github.com/charmbracelet/gum
synced 2024-06-05 07:12:19 +02:00
fixes errors with CR in write --value
This commit is contained in:
parent
65f5a7e44e
commit
f8adcd649b
|
@ -3,6 +3,7 @@ package write
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/alecthomas/kong"
|
||||
"github.com/charmbracelet/bubbles/textarea"
|
||||
|
@ -18,7 +19,7 @@ import (
|
|||
func (o Options) Run() error {
|
||||
in, _ := stdin.Read()
|
||||
if in != "" && o.Value == "" {
|
||||
o.Value = in
|
||||
o.Value = strings.Replace(in, "\r", "", -1)
|
||||
}
|
||||
|
||||
a := textarea.New()
|
||||
|
|
Loading…
Reference in a new issue