mirror of
https://github.com/charmbracelet/gum
synced 2026-03-14 13:45:45 +01:00
fix: ignore node_modules by default
This commit is contained in:
parent
66e01ac849
commit
d8ac24bcc6
1 changed files with 6 additions and 5 deletions
|
|
@ -26,12 +26,13 @@ func List() []string {
|
|||
|
||||
}
|
||||
|
||||
var defaultIgnorePatterns = []string{"node_modules", ".git", "."}
|
||||
|
||||
func shouldIgnore(path string) bool {
|
||||
if strings.HasPrefix(path, ".git") {
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(path, ".") {
|
||||
return true
|
||||
for _, prefix := range defaultIgnorePatterns {
|
||||
if strings.HasPrefix(path, prefix) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue