diff --git a/choose/command.go b/choose/command.go index ede9338..66691d8 100644 --- a/choose/command.go +++ b/choose/command.go @@ -34,8 +34,7 @@ func (o Options) Run() error { } if o.SelectIfOne && len(o.Options) == 1 { - print(o.Options[0]) - print("\n") + fmt.Println(o.Options[0]) return nil } diff --git a/filter/command.go b/filter/command.go index 95569b2..f4af719 100644 --- a/filter/command.go +++ b/filter/command.go @@ -44,12 +44,7 @@ func (o Options) Run() error { } if o.SelectIfOne && len(o.Options) == 1 { - if isatty.IsTerminal(os.Stdout.Fd()) { - fmt.Print(o.Options[0]) - } else { - fmt.Print(ansi.Strip(o.Options[0])) - } - print("\n") + fmt.Println(o.Options[0]) return nil }