Skip to content

Commit 8c9940d

Browse files
committed
Fix memo grep
1 parent 4f7c89d commit 8c9940d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

main.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434

3535
const (
3636
name = "memo"
37-
version = "0.0.14"
37+
version = "0.0.15"
3838
revision = "HEAD"
3939
)
4040

@@ -717,7 +717,11 @@ func cmdGrep(c *cli.Context) error {
717717
if runtime.GOOS == "windows" {
718718
pos := 0
719719
for {
720-
err1 := cfg.runcmd(cfg.GrepCmd, c.Args().First(), args[pos:pos+20]...)
720+
next := pos + 20
721+
if next > len(args) {
722+
next = len(args)
723+
}
724+
err1 := cfg.runcmd(cfg.GrepCmd, c.Args().First(), args[pos:next]...)
721725
if err != nil {
722726
err = err1
723727
}

0 commit comments

Comments
 (0)