diff --git a/completers/ffmpeg_completer/cmd/root.go b/completers/ffmpeg_completer/cmd/root.go index 0057e11d9d..af9e41fa8d 100644 --- a/completers/ffmpeg_completer/cmd/root.go +++ b/completers/ffmpeg_completer/cmd/root.go @@ -323,15 +323,13 @@ func actionFlagArguments(flag string) carapace.Action { name := strings.SplitN(strings.TrimLeft(flag, "-"), ":", 2)[0] switch name { case "c": - switch flag { - case "-c:a": - // TODO audio codecs - return ffmpeg.ActionCodecs() - case "-c:v": - return ffmpeg.ActionCodecs() - // TODO video codecs + switch { + case strings.HasPrefix(flag, "-c:a"): + return ffmpeg.ActionCodecs() // TODO audio codecs + case strings.HasPrefix(flag, "-c:v"): + return ffmpeg.ActionCodecs() // TODO video codecs default: - return carapace.ActionValues() + return carapace.ActionValues("copy") } case "h", "?", "help": return carapace.ActionMultiPartsN("=", 2, func(c carapace.Context) carapace.Action {