mirror of
https://github.com/charmbracelet/gum
synced 2024-06-09 01:02:17 +02:00
fix: ignore node_modules
by default
This commit is contained in:
parent
66e01ac849
commit
d8ac24bcc6
|
@ -26,12 +26,13 @@ func List() []string {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var defaultIgnorePatterns = []string{"node_modules", ".git", "."}
|
||||||
|
|
||||||
func shouldIgnore(path string) bool {
|
func shouldIgnore(path string) bool {
|
||||||
if strings.HasPrefix(path, ".git") {
|
for _, prefix := range defaultIgnorePatterns {
|
||||||
return true
|
if strings.HasPrefix(path, prefix) {
|
||||||
}
|
return true
|
||||||
if strings.HasPrefix(path, ".") {
|
}
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue