Skip to content
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
2 changes: 1 addition & 1 deletion fish.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ func prepareFishFlags(binary string, owner *Command) []string {
}

func fishAddFileFlag(flag Flag, completion *strings.Builder) {
// TakesFile is a field of every flag type, not only StringFlag and StringSliceFlag
if f, ok := flag.(interface{ takesFile() bool }); ok && f.takesFile() {
return
}
// -f stops fish from completing file names for the flag's value
completion.WriteString(" -f")
}

Expand Down
Loading