diff options
author | snan <sandra.snan@idiomdrottning.org> | 2023-12-07 16:29:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 10:29:40 -0500 |
commit | d1145b416387749dfa815ebc0e3494e586cc999a (patch) | |
tree | e965b63d4256935a60a162b4cf7a145d2daee3a2 | |
parent | c9afacc74b4b6fc6b592f1858dd318372e14b268 (diff) |
Add newline printing to --select-if-one (#459)
* Add newline printing to --select-if-one
This matches how choose works normally when there are more than
one option.
* Add newline printing to filter --select-if-one
To match how it works without --select-if-one.
-rw-r--r-- | choose/command.go | 1 | ||||
-rw-r--r-- | filter/command.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/choose/command.go b/choose/command.go index 5827e8e..ede9338 100644 --- a/choose/command.go +++ b/choose/command.go @@ -35,6 +35,7 @@ func (o Options) Run() error { if o.SelectIfOne && len(o.Options) == 1 { print(o.Options[0]) + print("\n") return nil } diff --git a/filter/command.go b/filter/command.go index 5587720..95569b2 100644 --- a/filter/command.go +++ b/filter/command.go @@ -49,6 +49,7 @@ func (o Options) Run() error { } else { fmt.Print(ansi.Strip(o.Options[0])) } + print("\n") return nil } |