Skip to content

Commit

Permalink
feat: add a command help-all
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Feb 3, 2025
1 parent 0572363 commit 874f0aa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ require (
github.com/suzuki-shunsuke/go-findconfig v1.2.0
github.com/suzuki-shunsuke/go-osenv v0.1.0
github.com/suzuki-shunsuke/logrus-error v0.1.4
github.com/suzuki-shunsuke/urfave-cli-help-all v0.0.3
github.com/urfave/cli/v2 v2.27.5
github.com/wk8/go-ordered-map/v2 v2.1.8
golang.org/x/oauth2 v0.25.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ github.com/suzuki-shunsuke/gomic v0.6.0 h1:oSmoXR1nmt7X05TssjBTcX9BCTNnFCcNlA5ys
github.com/suzuki-shunsuke/gomic v0.6.0/go.mod h1:/+uhQJ1H5f9ythus/MbXOotAZDmkN1QOjKlsSiH2v+I=
github.com/suzuki-shunsuke/logrus-error v0.1.4 h1:nWo98uba1fANHdZ9Y5pJ2RKs/PpVjrLzRp5m+mRb9KE=
github.com/suzuki-shunsuke/logrus-error v0.1.4/go.mod h1:WsVvvw6SKSt08/fB2qbnsKIMJA4K1MYCUprqsBJbMiM=
github.com/suzuki-shunsuke/urfave-cli-help-all v0.0.3 h1:T4sxm+cXfIX+4XHvC47ObJKaOU0oQenI70XCU1yParA=
github.com/suzuki-shunsuke/urfave-cli-help-all v0.0.3/go.mod h1:sSi6xaUaHfaqu32ECLeyE7NTMv+ZM5dW0JikhllaalY=
github.com/therootcompany/xz v1.0.1 h1:CmOtsn1CbtmyYiusbfmhmkpAAETj0wBIH6kCYaX+xzw=
github.com/therootcompany/xz v1.0.1/go.mod h1:3K3UH1yCKgBneZYhuQUvJ9HPD19UEXEI0BWbMn8qNMY=
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
Expand Down
22 changes: 12 additions & 10 deletions pkg/cli/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/aquaproj/aqua/v2/pkg/cli/vacuum"
"github.com/aquaproj/aqua/v2/pkg/cli/version"
"github.com/aquaproj/aqua/v2/pkg/cli/which"
"github.com/suzuki-shunsuke/urfave-cli-help-all/helpall"
"github.com/urfave/cli/v2"
)

Expand Down Expand Up @@ -88,27 +89,28 @@ func Run(ctx context.Context, param *util.Param, args ...string) error { //nolin
EnableBashCompletion: true,
Commands: commands(
param,
info.New,
initcmd.New,
cpolicy.New,
cpolicy.NewInitPolicy,
install.New,
updateaqua.New,
generate.New,
updateaqua.New,
upc.New,
update.New,
completion.New,
which.New,
info.New,
remove.New,
vacuum.New,
cp.New,
cpolicy.New,
cpolicy.NewInitPolicy,
exec.New,
list.New,
genr.New,
completion.New,
version.New,
cp.New,
root.New,
upc.New,
remove.New,
update.New,
vacuum.New,
),
}
app.Commands = append(app.Commands, helpall.New(nil))

return app.RunContext(ctx, args) //nolint:wrapcheck
}
Expand Down

0 comments on commit 874f0aa

Please sign in to comment.