run modernize

This commit is contained in:
Kovid Goyal
2025-11-11 17:09:37 +05:30
parent 1faf786bd2
commit 6f588a0c29
30 changed files with 46 additions and 60 deletions

View File

@@ -7,6 +7,7 @@ import (
"mime"
"os"
"path/filepath"
"slices"
"strings"
"golang.org/x/sys/unix"
@@ -185,13 +186,7 @@ func complete_by_fnmatch(prefix, cwd string, patterns []string) []string {
}
func complete_by_mimepat(prefix, cwd string, patterns []string) []string {
all_allowed := false
for _, p := range patterns {
if p == "*" {
all_allowed = true
break
}
}
all_allowed := slices.Contains(patterns, "*")
return fname_based_completer(prefix, cwd, func(name string) bool {
if all_allowed {
return true