Skip to content

Commit

Permalink
feat(walker): add multiple root dirs capability
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Sabathier authored and msabathier committed Nov 22, 2024
1 parent 2b7f168 commit 36bee91
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package fzf

import (
"bytes"
"strings"
"context"
"io"
"io/fs"
Expand Down Expand Up @@ -301,7 +302,12 @@ func (r *Reader) readFiles(root string, opts walkerOpts, ignores []string) bool
}
return nil
}
return fastwalk.Walk(&conf, root, fn) == nil
roots := strings.Split(root, ",")
noerr := true
for _, root := range roots {
noerr = noerr && (fastwalk.Walk(&conf, root, fn) == nil)
}
return noerr
}

func (r *Reader) readFromCommand(command string, environ []string, signalReady func()) bool {
Expand Down

0 comments on commit 36bee91

Please sign in to comment.