Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete unknown value in set filetype ... #3214

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions internal/action/infocomplete.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ func filetypeComplete(input string) (string, []string) {
}
}

if strings.HasPrefix("off", input) {
suggestions = append(suggestions, "off")
}
if strings.HasPrefix("unknown", input) {
JoeKar marked this conversation as resolved.
Show resolved Hide resolved
suggestions = append(suggestions, "unknown")
}

var chosen string
if len(suggestions) == 1 {
chosen = suggestions[0]
Expand Down
Loading