Merge pull request #3214 from dmaluka/filetype-autocomplete-unknown

Autocomplete `unknown` value in `set filetype ...`
This commit is contained in:
Dmytro Maluka
2024-03-25 19:38:10 +01:00
committed by GitHub

View File

@@ -87,6 +87,13 @@ func filetypeComplete(input string) (string, []string) {
}
}
if strings.HasPrefix("off", input) {
suggestions = append(suggestions, "off")
}
if strings.HasPrefix("unknown", input) {
suggestions = append(suggestions, "unknown")
}
var chosen string
if len(suggestions) == 1 {
chosen = suggestions[0]