From 1a5e919a747e57e430790c8597d8462452bf3364 Mon Sep 17 00:00:00 2001 From: Laura Date: Thu, 19 Jun 2025 13:09:08 +0200 Subject: [PATCH] load default codecs --- .gitignore | 4 +++- cmd/ffwebp/codecs.go | 8 ++++++++ cmd/ffwebp/main.go | 17 ++++++++++------- 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 cmd/ffwebp/codecs.go diff --git a/.gitignore b/.gitignore index c5e82d7..70102cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -bin \ No newline at end of file +bin +example.* +test.* \ No newline at end of file diff --git a/cmd/ffwebp/codecs.go b/cmd/ffwebp/codecs.go new file mode 100644 index 0000000..c7db1fd --- /dev/null +++ b/cmd/ffwebp/codecs.go @@ -0,0 +1,8 @@ +package main + +import ( + _ "github.com/coalaura/ffwebp/internal/codec/bmp" + _ "github.com/coalaura/ffwebp/internal/codec/gif" + _ "github.com/coalaura/ffwebp/internal/codec/jpeg" + _ "github.com/coalaura/ffwebp/internal/codec/png" +) diff --git a/cmd/ffwebp/main.go b/cmd/ffwebp/main.go index 3f2fc8d..87d0c31 100644 --- a/cmd/ffwebp/main.go +++ b/cmd/ffwebp/main.go @@ -53,13 +53,16 @@ func main() { }) app := &cli.Command{ - Name: "ffwebp", - Usage: "Convert any image format into any other image format", - Version: Version, - Flags: flags, - Action: run, - Writer: os.Stderr, - ErrWriter: os.Stderr, + Name: "ffwebp", + Usage: "Convert any image format into any other image format", + Version: Version, + Flags: flags, + Action: run, + Writer: os.Stderr, + ErrWriter: os.Stderr, + EnableShellCompletion: true, + UseShortOptionHandling: true, + Suggest: true, } if err := app.Run(context.Background(), os.Args); err != nil {