diff --git a/CHANGELOG.md b/CHANGELOG.md index ec552074..12593b1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +- (Breaking change; cli) The verbs `rm` and `remove` have been deleted from all commands (e.g. `forklift pallet rm`), because the two-character verb `rm` doesn't line up nicely with the three-character verb `add`; `del` or `delete` should be used instead (e.g. `forklift pallet del`). + ### Fixed - (cli) Git progress log messages are now printed to stderr instead of stdout. diff --git a/cmd/forklift/cache/cache.go b/cmd/forklift/cache/cache.go index c7c2d5e9..55567e27 100644 --- a/cmd/forklift/cache/cache.go +++ b/cmd/forklift/cache/cache.go @@ -79,28 +79,28 @@ func getRepoCache(wpath string, ensureWorkspace bool) (*forklift.FSRepoCache, er return cache, nil } -// rm-all +// del-all -func rmAllAction(c *cli.Context) error { - if err := rmGitRepoAction("mirror", getMirrorCache)(c); err != nil { +func delAllAction(c *cli.Context) error { + if err := delGitRepoAction("mirror", getMirrorCache)(c); err != nil { return errors.Wrap(err, "couldn't remove cached mirrors") } - if err := rmGitRepoAction("pallet", getPalletCache)(c); err != nil { + if err := delGitRepoAction("pallet", getPalletCache)(c); err != nil { return errors.Wrap(err, "couldn't remove cached pallets") } - if err := rmGitRepoAction("repo", getRepoCache)(c); err != nil { + if err := delGitRepoAction("repo", getRepoCache)(c); err != nil { return errors.Wrap(err, "couldn't remove cached repositories") } - if err := rmImgAction(c); err != nil { + if err := delImgAction(c); err != nil { return errors.Wrap(err, "couldn't remove unused Docker container images") } return nil } -// rm-img +// del-img -func rmImgAction(_ *cli.Context) error { +func delImgAction(_ *cli.Context) error { fmt.Fprintln(os.Stderr, "Removing unused Docker container images...") client, err := docker.NewClient() if err != nil { diff --git a/cmd/forklift/cache/cli.go b/cmd/forklift/cache/cli.go index 23786b46..e1b557b8 100644 --- a/cmd/forklift/cache/cli.go +++ b/cmd/forklift/cache/cli.go @@ -95,49 +95,49 @@ var Cmd = &cli.Command{ Action: addGitRepoAction(getRepoCache), }, { - Name: "rm-all", - Aliases: []string{"remove-all", "del-all", "delete-all"}, + Name: "del-all", + Aliases: []string{"delete-all"}, Category: "Modify the cache", Usage: "Removes all cached resources", - Action: rmAllAction, + Action: delAllAction, }, { - Name: "rm-mir", - Aliases: []string{"remove-mirrors", "del-mir", "delete-mirrors"}, + Name: "del-mir", + Aliases: []string{"delete-mirrors"}, Category: "Modify the cache", Usage: "Removes local mirrors of git repositories", // TODO: allow only removing mirrors matching a glob pattern - Action: rmGitRepoAction("mirror", getMirrorCache), + Action: delGitRepoAction("mirror", getMirrorCache), }, { - Name: "rm-plt", - Aliases: []string{"remove-pallets", "del-plt", "delete-pallets"}, + Name: "del-plt", + Aliases: []string{"delete-pallets"}, Category: "Modify the cache", Usage: "Removes locally-cached pallets", // TODO: allow only removing pallets matching a glob pattern - Action: rmGitRepoAction("pallet", getPalletCache), + Action: delGitRepoAction("pallet", getPalletCache), }, { - Name: "rm-repo", - Aliases: []string{"remove-repositories", "del-repo", "delete-repositories"}, + Name: "del-repo", + Aliases: []string{"delete-repositories"}, Category: "Modify the cache", Usage: "Removes locally-cached repos", // TODO: allow only removing repos matching a glob pattern - Action: rmGitRepoAction("repo", getRepoCache), + Action: delGitRepoAction("repo", getRepoCache), }, { - Name: "rm-dl", - Aliases: []string{"remove-downloads", "del-dl", "delete-downloads"}, + Name: "del-dl", + Aliases: []string{"delete-downloads"}, Category: "Modify the cache", Usage: "Removes locally-cached file downloads", - Action: rmDlAction, + Action: delDlAction, }, { - Name: "rm-img", - Aliases: []string{"remove-images", "del-img", "delete-images"}, + Name: "del-img", + Aliases: []string{"delete-images"}, Category: "Modify the cache", Usage: "Removes unused Docker container images", - Action: rmImgAction, + Action: delImgAction, }, }, } diff --git a/cmd/forklift/cache/downloads.go b/cmd/forklift/cache/downloads.go index 29d0a490..00151946 100644 --- a/cmd/forklift/cache/downloads.go +++ b/cmd/forklift/cache/downloads.go @@ -44,9 +44,9 @@ func lsDlAction(c *cli.Context) error { return nil } -// rm-dl +// del-dl -func rmDlAction(c *cli.Context) error { +func delDlAction(c *cli.Context) error { workspace, err := forklift.LoadWorkspace(c.String("workspace")) if err != nil { return err diff --git a/cmd/forklift/cache/git-repositories.go b/cmd/forklift/cache/git-repositories.go index d01d4c74..0dc309ff 100644 --- a/cmd/forklift/cache/git-repositories.go +++ b/cmd/forklift/cache/git-repositories.go @@ -94,9 +94,9 @@ type remover interface { Remove() error } -// rm-* +// del-* -func rmGitRepoAction[Cache remover]( +func delGitRepoAction[Cache remover]( gitRepoType string, cacheGetter func(wpath string, ensureWorkspace bool) (Cache, error), ) func(c *cli.Context) error { return func(c *cli.Context) error { diff --git a/cmd/forklift/dev/plt/cli.go b/cmd/forklift/dev/plt/cli.go index 05c1ed9c..d9e6d59f 100644 --- a/cmd/forklift/dev/plt/cli.go +++ b/cmd/forklift/dev/plt/cli.go @@ -448,8 +448,8 @@ func makeModifySubcmds(versions Versions) []*cli.Command { return slices.Concat( makeModifyFileSubcmds(), makeModifyPltSubcmds(versions), - // TODO: add `add-imp`, `rm-imp`, `set-imp-disabled`, `unset-imp-disabled`, - // `add-imp-mod`, and `rm-imp-mod` subcommands + // TODO: add `add-imp`, `del-imp`, `set-imp-disabled`, `unset-imp-disabled`, + // `add-imp-mod`, and `del-imp-mod` subcommands makeModifyRepoSubcmds(versions), makeModifyDeplSubcmds(versions), ) @@ -473,18 +473,18 @@ func makeModifyFileSubcmds() []*cli.Command { }, }, { - Name: "rm-file", - Aliases: []string{"remove-file", "del-file", "delete-file"}, + Name: "del-file", + Aliases: []string{"delete-file"}, Category: category, Usage: "Removes the specified file in the development pallet", ArgsUsage: "file_path", - Action: rmFileAction, + Action: delFileAction, }, } } func makeModifyPltSubcmds(versions Versions) []*cli.Command { - const category = "Modify the pallet's pallet requirements" + const category = "Modify the pallet's requirements" return []*cli.Command{ { Name: "add-plt", @@ -511,10 +511,9 @@ func makeModifyPltSubcmds(versions Versions) []*cli.Command { // TODO: add a show-upgrade-plt-query plt_path[@] command // TODO: add a set-upgrade-plt-query plt_path@version_query command { - Name: "rm-plt", + Name: "del-plt", Aliases: []string{ - "remove-pallet", "remove-pallets", - "del-plt", "delete-pallet", "delete-pallets", + "delete-pallet", "delete-pallets", "drop-plt", "drop-pallet", "drop-pallets", }, Category: category, @@ -527,13 +526,13 @@ func makeModifyPltSubcmds(versions Versions) []*cli.Command { "depend on them", }, }, - Action: rmPltAction(versions), + Action: delPltAction(versions), }, } } func makeModifyRepoSubcmds(versions Versions) []*cli.Command { - const category = "Modify the pallet's package repository requirements" + const category = "Modify the pallet's requirements" return []*cli.Command{ { Name: "add-repo", @@ -560,10 +559,9 @@ func makeModifyRepoSubcmds(versions Versions) []*cli.Command { // TODO: add a set-upgrade-repo-query repo_path@version_query command }, { - Name: "rm-repo", + Name: "del-repo", Aliases: []string{ - "remove-repository", "remove-repositories", - "del-repo", "delete-repository", "delete-repositories", + "delete-repository", "delete-repositories", "drop-repo", "drop-repository", "drop-repositories", }, Category: category, @@ -576,7 +574,7 @@ func makeModifyRepoSubcmds(versions Versions) []*cli.Command { "depend on them", }, }, - Action: rmRepoAction(versions), + Action: delRepoAction(versions), }, } } @@ -629,16 +627,13 @@ func makeModifyDeplSubcmds( //nolint:funlen // this is already decomposed; it's Action: addDeplAction(versions), }, { - Name: "rm-depl", - Aliases: []string{ - "remove-deployment", "remove-deployments", - "del-depl", "delete-deployment", "delete-deployments", - }, + Name: "del-depl", + Aliases: []string{"delete-deployment", "delete-deployments"}, Category: category, Usage: "Removes deployment from the pallet", ArgsUsage: "deployment_name...", Flags: baseFlags, - Action: rmDeplAction(versions), + Action: delDeplAction(versions), }, { Name: "set-depl-pkg", @@ -683,11 +678,8 @@ func makeModifyDeplSubcmds( //nolint:funlen // this is already decomposed; it's Action: addDeplFeatAction(versions), }, { - Name: "rm-depl-feat", + Name: "del-depl-feat", Aliases: []string{ - "remove-deployment-feature", - "remove-deployment-features", - "del-depl-feat", "delete-deployment-feature", "delete-deployment-features", "disable-depl-feat", @@ -698,7 +690,7 @@ func makeModifyDeplSubcmds( //nolint:funlen // this is already decomposed; it's Usage: "Disables the specified package features in the specified deployment", ArgsUsage: "deployment_name feature_name...", Flags: baseFlags, - Action: rmDeplFeatAction(versions), + Action: delDeplFeatAction(versions), }, { Name: "set-depl-disabled", diff --git a/cmd/forklift/dev/plt/deployments.go b/cmd/forklift/dev/plt/deployments.go index a5025793..bf5ffbaf 100644 --- a/cmd/forklift/dev/plt/deployments.go +++ b/cmd/forklift/dev/plt/deployments.go @@ -95,9 +95,9 @@ func addDeplAction(versions Versions) cli.ActionFunc { } } -// rm-depl +// del-depl -func rmDeplAction(versions Versions) cli.ActionFunc { +func delDeplAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { plt, caches, err := processFullBaseArgs(c, processingOptions{ requirePalletCache: true, @@ -206,9 +206,9 @@ func addDeplFeatAction(versions Versions) cli.ActionFunc { } } -// rm-depl-feat +// del-depl-feat -func rmDeplFeatAction(versions Versions) cli.ActionFunc { +func delDeplFeatAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { plt, caches, err := processFullBaseArgs(c, processingOptions{ requirePalletCache: true, diff --git a/cmd/forklift/dev/plt/files.go b/cmd/forklift/dev/plt/files.go index 67cc6b37..e0a7d2db 100644 --- a/cmd/forklift/dev/plt/files.go +++ b/cmd/forklift/dev/plt/files.go @@ -82,9 +82,9 @@ func editFileAction(c *cli.Context) error { return fcli.EditFileWithCOW(plt, c.Args().First(), c.String("editor")) } -// rm-file +// del-file -func rmFileAction(c *cli.Context) error { +func delFileAction(c *cli.Context) error { plt, _, err := processFullBaseArgs(c, processingOptions{ enableOverrides: true, merge: true, diff --git a/cmd/forklift/dev/plt/pallets.go b/cmd/forklift/dev/plt/pallets.go index d11f7559..ba58d158 100644 --- a/cmd/forklift/dev/plt/pallets.go +++ b/cmd/forklift/dev/plt/pallets.go @@ -541,9 +541,9 @@ func addPltAction(versions Versions) cli.ActionFunc { } } -// rm-plt +// del-plt -func rmPltAction(versions Versions) cli.ActionFunc { +func delPltAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { plt, err := getShallowPallet(c.String("cwd")) if err != nil { diff --git a/cmd/forklift/dev/plt/repositories.go b/cmd/forklift/dev/plt/repositories.go index 1f914d04..09917598 100644 --- a/cmd/forklift/dev/plt/repositories.go +++ b/cmd/forklift/dev/plt/repositories.go @@ -132,9 +132,9 @@ func addRepoAction(versions Versions) cli.ActionFunc { } } -// rm-repo +// del-repo -func rmRepoAction(versions Versions) cli.ActionFunc { +func delRepoAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { plt, _, err := processFullBaseArgs(c, processingOptions{ enableOverrides: true, diff --git a/cmd/forklift/host/cli.go b/cmd/forklift/host/cli.go index 117f1c52..ddec49f3 100644 --- a/cmd/forklift/host/cli.go +++ b/cmd/forklift/host/cli.go @@ -24,11 +24,11 @@ var Cmd = &cli.Command{ Action: lsConAction, }, { - Name: "rm", - Aliases: []string{"remove", "del", "delete"}, + Name: "del", + Aliases: []string{"delete"}, Category: "Modify the Docker host", Usage: "Removes all Docker Compose applications", - Action: rmAction, + Action: delAction, }, }, } diff --git a/cmd/forklift/host/host.go b/cmd/forklift/host/host.go index 278e2c75..a430ba9f 100644 --- a/cmd/forklift/host/host.go +++ b/cmd/forklift/host/host.go @@ -57,9 +57,9 @@ func lsConAction(c *cli.Context) error { return nil } -// rm +// del -func rmAction(c *cli.Context) error { +func delAction(c *cli.Context) error { client, err := docker.NewClient() if err != nil { return errors.Wrap(err, "couldn't make Docker API client") diff --git a/cmd/forklift/plt/cli.go b/cmd/forklift/plt/cli.go index cd2f0301..4b7a9be7 100644 --- a/cmd/forklift/plt/cli.go +++ b/cmd/forklift/plt/cli.go @@ -57,9 +57,11 @@ func MakeCmd(versions Versions) *cli.Command { } func makeUpgradeSubcmds(versions Versions) []*cli.Command { + const category = "Upgrade the pallet" return []*cli.Command{ { - Name: "upgrade", + Name: "upgrade", + Category: category, Usage: "Replaces the local pallet with an upgraded version, updates the cache, and " + "stages the pallet", ArgsUsage: "[[pallet_path]@[version_query]]", @@ -85,7 +87,8 @@ func makeUpgradeSubcmds(versions Versions) []*cli.Command { }, }, { - Name: "check-upgrade", + Name: "check-upgrade", + Category: category, // TODO: also check whether the upgrade is cached Usage: "Checks whether an upgrade is available", ArgsUsage: "[[pallet_path]@[version_query]]", @@ -100,12 +103,14 @@ func makeUpgradeSubcmds(versions Versions) []*cli.Command { }, // TODO: add a cache-upgrade command { - Name: "show-upgrade-query", - Usage: "Shows the query used for pallet upgrades", - Action: showUpgradeQueryAction, + Name: "show-upgrade-query", + Category: category, + Usage: "Shows the query used for pallet upgrades", + Action: showUpgradeQueryAction, }, { Name: "set-upgrade-query", + Category: category, Usage: "Changes the query used for pallet upgrades", ArgsUsage: "[[pallet_path]@[version_query]]", Action: setUpgradeQueryAction, @@ -511,17 +516,17 @@ func makeModifySubcmds(versions Versions) []*cli.Command { makeModifyGitSubcmds(versions), []*cli.Command{ { - Name: "rm", - Aliases: []string{"remove"}, + Name: "del", + Aliases: []string{"delete"}, Category: category, Usage: "Removes the local pallet", - Action: rmAction, + Action: delAction, }, }, makeModifyFileSubcmds(), makeModifyPltSubcmds(versions), - // TODO: add `add-imp`, `rm-imp`, `set-imp-disabled`, `unset-imp-disabled`, - // `add-imp-mod`, and `rm-imp-mod` subcommands + // TODO: add `add-imp`, `del-imp`, `set-imp-disabled`, `unset-imp-disabled`, + // `add-imp-mod`, and `del-imp-mod` subcommands makeModifyRepoSubcmds(versions), makeModifyDeplSubcmds(versions), ) @@ -629,18 +634,18 @@ func makeModifyFileSubcmds() []*cli.Command { }, }, { - Name: "rm-file", - Aliases: []string{"remove-file", "del-file", "delete-file"}, + Name: "del-file", + Aliases: []string{"delete-file"}, Category: category, Usage: "Removes the specified file in the development pallet", ArgsUsage: "file_path", - Action: rmFileAction, + Action: delFileAction, }, } } func makeModifyPltSubcmds(versions Versions) []*cli.Command { - const category = "Modify the pallet's pallet requirements" + const category = "Modify the pallet's requirements" return []*cli.Command{ { Name: "add-plt", @@ -667,11 +672,9 @@ func makeModifyPltSubcmds(versions Versions) []*cli.Command { // TODO: add a show-upgrade-plt-query plt_path[@] command // TODO: add a set-upgrade-plt-query plt_path@version_query command { - Name: "rm-plt", + Name: "del-plt", Aliases: []string{ - "remove-pallet", "remove-pallets", - "del-plt", "delete-pallet", "delete-pallets", - "drop-plt", "drop-pallet", "drop-pallets", + "delete-pallet", "delete-pallets", "drop-plt", "drop-pallet", "drop-pallets", }, Category: category, Usage: "Removes pallet requirements from the pallet", @@ -683,13 +686,13 @@ func makeModifyPltSubcmds(versions Versions) []*cli.Command { "depend on them", }, }, - Action: rmPltAction(versions), + Action: delPltAction(versions), }, } } func makeModifyRepoSubcmds(versions Versions) []*cli.Command { - const category = "Modify the pallet's package repository requirements" + const category = "Modify the pallet's requirements" return []*cli.Command{ { Name: "add-repo", @@ -716,10 +719,9 @@ func makeModifyRepoSubcmds(versions Versions) []*cli.Command { // TODO: add a show-upgrade-repo-query repo_path[@] command // TODO: add a set-upgrade-repo-query repo_path@version_query command { - Name: "rm-repo", + Name: "del-repo", Aliases: []string{ - "remove-repository", "remove-repositories", - "del-repo", "delete-repository", "delete-repositories", + "delete-repository", "delete-repositories", "drop-repo", "drop-repository", "drop-repositories", }, Category: category, @@ -732,7 +734,7 @@ func makeModifyRepoSubcmds(versions Versions) []*cli.Command { "depend on them", }, }, - Action: rmRepoAction(versions), + Action: delRepoAction(versions), }, } } @@ -770,16 +772,13 @@ func makeModifyDeplSubcmds( //nolint:funlen // this is already decomposed; it's Action: addDeplAction(versions), }, { - Name: "rm-depl", - Aliases: []string{ - "remove-deployment", "remove-deployments", - "del-depl", "delete-deployment", "delete-deployments", - }, + Name: "del-depl", + Aliases: []string{"delete-deployment", "delete-deployments"}, Category: category, Usage: "Removes deployment from the pallet", ArgsUsage: "deployment_name...", Flags: modifyDeplBaseFlags, - Action: rmDeplAction(versions), + Action: delDeplAction(versions), }, { Name: "set-depl-pkg", @@ -824,22 +823,16 @@ func makeModifyDeplSubcmds( //nolint:funlen // this is already decomposed; it's Action: addDeplFeatAction(versions), }, { - Name: "rm-depl-feat", + Name: "del-depl-feat", Aliases: []string{ - "remove-deployment-feature", - "remove-deployment-features", - "del-depl-feat", - "delete-deployment-feature", - "delete-deployment-features", - "disable-depl-feat", - "disable-deployment-feature", - "disable-deployment-features", + "delete-deployment-feature", "delete-deployment-features", + "disable-depl-feat", "disable-deployment-feature", "disable-deployment-features", }, Category: category, Usage: "Disables the specified package features in the specified deployment", ArgsUsage: "deployment_name feature_name...", Flags: modifyDeplBaseFlags, - Action: rmDeplFeatAction(versions), + Action: delDeplFeatAction(versions), }, { Name: "set-depl-disabled", diff --git a/cmd/forklift/plt/deployments.go b/cmd/forklift/plt/deployments.go index eced667c..8452029a 100644 --- a/cmd/forklift/plt/deployments.go +++ b/cmd/forklift/plt/deployments.go @@ -91,9 +91,9 @@ func addDeplAction(versions Versions) cli.ActionFunc { } } -// rm-depl +// del-depl -func rmDeplAction(versions Versions) cli.ActionFunc { +func delDeplAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { plt, caches, err := processFullBaseArgs(c.String("workspace"), processingOptions{ requirePalletCache: true, @@ -199,9 +199,9 @@ func addDeplFeatAction(versions Versions) cli.ActionFunc { } } -// rm-depl-feat +// del-depl-feat -func rmDeplFeatAction(versions Versions) cli.ActionFunc { +func delDeplFeatAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { plt, caches, err := processFullBaseArgs(c.String("workspace"), processingOptions{ requirePalletCache: true, diff --git a/cmd/forklift/plt/files.go b/cmd/forklift/plt/files.go index 20fbb760..5a76b018 100644 --- a/cmd/forklift/plt/files.go +++ b/cmd/forklift/plt/files.go @@ -78,9 +78,9 @@ func editFileAction(c *cli.Context) error { return fcli.EditFileWithCOW(plt, c.Args().First(), c.String("editor")) } -// rm-file +// del-file -func rmFileAction(c *cli.Context) error { +func delFileAction(c *cli.Context) error { plt, _, err := processFullBaseArgs(c.String("workspace"), processingOptions{ merge: true, }) diff --git a/cmd/forklift/plt/pallets.go b/cmd/forklift/plt/pallets.go index d9332dee..22931c88 100644 --- a/cmd/forklift/plt/pallets.go +++ b/cmd/forklift/plt/pallets.go @@ -786,9 +786,9 @@ func pullAction(versions Versions) cli.ActionFunc { } } -// rm +// del -func rmAction(c *cli.Context) error { +func delAction(c *cli.Context) error { workspace, err := forklift.LoadWorkspace(c.String("workspace")) if err != nil { return err @@ -1063,9 +1063,9 @@ func addPltAction(versions Versions) cli.ActionFunc { } } -// rm-plt +// del-plt -func rmPltAction(versions Versions) cli.ActionFunc { +func delPltAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { plt, err := getShallowPallet(c.String("workspace")) if err != nil { diff --git a/cmd/forklift/plt/repositories.go b/cmd/forklift/plt/repositories.go index c7ceeb6a..c74b618f 100644 --- a/cmd/forklift/plt/repositories.go +++ b/cmd/forklift/plt/repositories.go @@ -124,9 +124,9 @@ func addRepoAction(versions Versions) cli.ActionFunc { } } -// rm-repo +// del-repo -func rmRepoAction(versions Versions) cli.ActionFunc { +func delRepoAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { plt, _, err := processFullBaseArgs(c.String("workspace"), processingOptions{}) if err != nil { diff --git a/cmd/forklift/stage/bundles.go b/cmd/forklift/stage/bundles.go index bf8e439a..4ed59851 100644 --- a/cmd/forklift/stage/bundles.go +++ b/cmd/forklift/stage/bundles.go @@ -128,11 +128,11 @@ func locateBunAction(versions Versions) cli.ActionFunc { } } -// rm-bun +// del-bun const knownSnippet = "last staged pallet bundle known to have been successfully applied" -func rmBunAction(versions Versions) cli.ActionFunc { +func delBunAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { store, err := getStageStore(c.String("workspace"), c.String("stage-store"), versions) if err != nil { diff --git a/cmd/forklift/stage/cli.go b/cmd/forklift/stage/cli.go index 56676636..8573a788 100644 --- a/cmd/forklift/stage/cli.go +++ b/cmd/forklift/stage/cli.go @@ -185,20 +185,20 @@ func makeModifyBunSubcmds(versions Versions) []*cli.Command { Action: addBunNameAction(versions), }, { - Name: "rm-bun-name", - Aliases: []string{"remove-bundle-name", "del-bun-name", "delete-bundle-name"}, + Name: "del-bun-name", + Aliases: []string{"delete-bundle-name"}, Category: category, Usage: "Unsets a name for a staged pallet bundle", ArgsUsage: "bundle_name", - Action: rmBunNameAction(versions), + Action: delBunNameAction(versions), }, { - Name: "rm-bun", - Aliases: []string{"remove-bundle", "del-bun", "delete-bundle"}, + Name: "del-bun", + Aliases: []string{"delete-bundle"}, Category: category, Usage: "Deletes the specified staged pallet bundle", ArgsUsage: "bundle_index_or_name", - Action: rmBunAction(versions), + Action: delBunAction(versions), }, { Name: "prune-bun", diff --git a/cmd/forklift/stage/names.go b/cmd/forklift/stage/names.go index 2bf8253c..54d8afc2 100644 --- a/cmd/forklift/stage/names.go +++ b/cmd/forklift/stage/names.go @@ -110,9 +110,9 @@ func addBunNameAction(versions Versions) cli.ActionFunc { } } -// rm-bun-name +// del-bun-name -func rmBunNameAction(versions Versions) cli.ActionFunc { +func delBunNameAction(versions Versions) cli.ActionFunc { return func(c *cli.Context) error { store, err := getStageStore(c.String("workspace"), c.String("stage-store"), versions) if err != nil {