From 56f6d734f32a6ac959f6db6abb730fb249eff3ab Mon Sep 17 00:00:00 2001 From: Raj Date: Tue, 4 Nov 2025 13:35:29 -0800 Subject: [PATCH] UX: fix typos, grammar and consistency issues (#845) Fixes several typos, grammatical errors, and consistency issues to make the UX smoother :) --- .../Container/ContainerDelete.swift | 2 +- .../Container/ContainerInspect.swift | 2 +- .../Container/ContainerKill.swift | 4 ++-- .../Container/ContainerStop.swift | 4 ++-- Sources/ContainerCommands/Image/ImageDelete.swift | 8 ++++---- Sources/ContainerCommands/Image/ImageList.swift | 4 ++-- Sources/ContainerCommands/Image/ImagePush.swift | 2 +- Sources/ContainerCommands/Image/ImageSave.swift | 4 ++-- Sources/ContainerCommands/Image/ImageTag.swift | 4 ++-- .../ContainerCommands/Volume/VolumeCreate.swift | 2 +- .../ContainerCommands/Volume/VolumeInspect.swift | 2 +- docs/command-reference.md | 14 +++++++------- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Sources/ContainerCommands/Container/ContainerDelete.swift b/Sources/ContainerCommands/Container/ContainerDelete.swift index ddb02a51..8c262d68 100644 --- a/Sources/ContainerCommands/Container/ContainerDelete.swift +++ b/Sources/ContainerCommands/Container/ContainerDelete.swift @@ -28,7 +28,7 @@ extension Application { abstract: "Delete one or more containers", aliases: ["rm"]) - @Flag(name: .shortAndLong, help: "Remove all containers") + @Flag(name: .shortAndLong, help: "Delete all containers") var all = false @Flag(name: .shortAndLong, help: "Delete containers even if they are running") diff --git a/Sources/ContainerCommands/Container/ContainerInspect.swift b/Sources/ContainerCommands/Container/ContainerInspect.swift index 26ad1033..68c1bc68 100644 --- a/Sources/ContainerCommands/Container/ContainerInspect.swift +++ b/Sources/ContainerCommands/Container/ContainerInspect.swift @@ -30,7 +30,7 @@ extension Application { @OptionGroup var global: Flags.Global - @Argument(help: "Container IDs") + @Argument(help: "Container IDs to inspect") var containerIds: [String] public func run() async throws { diff --git a/Sources/ContainerCommands/Container/ContainerKill.swift b/Sources/ContainerCommands/Container/ContainerKill.swift index f26d019d..c6bc4079 100644 --- a/Sources/ContainerCommands/Container/ContainerKill.swift +++ b/Sources/ContainerCommands/Container/ContainerKill.swift @@ -45,7 +45,7 @@ extension Application { throw ContainerizationError(.invalidArgument, message: "no containers specified and --all not supplied") } if containerIds.count > 0 && all { - throw ContainerizationError(.invalidArgument, message: "explicitly supplied container IDs conflicts with the --all flag") + throw ContainerizationError(.invalidArgument, message: "explicitly supplied container IDs conflict with the --all flag") } } @@ -74,7 +74,7 @@ extension Application { } } if failed.count > 0 { - throw ContainerizationError(.internalError, message: "kill failed for one or more containers") + throw ContainerizationError(.internalError, message: "kill failed for one or more containers \(failed.joined(separator: ","))") } } } diff --git a/Sources/ContainerCommands/Container/ContainerStop.swift b/Sources/ContainerCommands/Container/ContainerStop.swift index c10b426b..09654656 100644 --- a/Sources/ContainerCommands/Container/ContainerStop.swift +++ b/Sources/ContainerCommands/Container/ContainerStop.swift @@ -31,7 +31,7 @@ extension Application { @Flag(name: .shortAndLong, help: "Stop all running containers") var all = false - @Option(name: .shortAndLong, help: "Signal to send the containers") + @Option(name: .shortAndLong, help: "Signal to send to the containers") var signal: String = "SIGTERM" @Option(name: .shortAndLong, help: "Seconds to wait before killing the containers") @@ -49,7 +49,7 @@ extension Application { } if containerIds.count > 0 && all { throw ContainerizationError( - .invalidArgument, message: "explicitly supplied container IDs conflicts with the --all flag") + .invalidArgument, message: "explicitly supplied container IDs conflict with the --all flag") } } diff --git a/Sources/ContainerCommands/Image/ImageDelete.swift b/Sources/ContainerCommands/Image/ImageDelete.swift index e998b98e..23cac1bc 100644 --- a/Sources/ContainerCommands/Image/ImageDelete.swift +++ b/Sources/ContainerCommands/Image/ImageDelete.swift @@ -24,7 +24,7 @@ extension Application { public struct RemoveImageOptions: ParsableArguments { public init() {} - @Flag(name: .shortAndLong, help: "Remove all images") + @Flag(name: .shortAndLong, help: "Delete all images") var all: Bool = false @OptionGroup @@ -37,7 +37,7 @@ extension Application { struct DeleteImageImplementation { static func validate(options: RemoveImageOptions) throws { if options.images.count == 0 && !options.all { - throw ContainerizationError(.invalidArgument, message: "no image specified and --all not supplied") + throw ContainerizationError(.invalidArgument, message: "no images specified and --all not supplied") } if options.images.count > 0 && options.all { throw ContainerizationError(.invalidArgument, message: "explicitly supplied images conflict with the --all flag") @@ -64,7 +64,7 @@ extension Application { print(image.reference) didDeleteAnyImage = true } catch { - log.error("failed to remove \(image.reference): \(error)") + log.error("failed to delete \(image.reference): \(error)") failures.append(image.reference) } } @@ -87,7 +87,7 @@ extension Application { public static let configuration = CommandConfiguration( commandName: "delete", - abstract: "Remove one or more images", + abstract: "Delete one or more images", aliases: ["rm"]) public init() {} diff --git a/Sources/ContainerCommands/Image/ImageList.swift b/Sources/ContainerCommands/Image/ImageList.swift index ba63c42b..4999d5f7 100644 --- a/Sources/ContainerCommands/Image/ImageList.swift +++ b/Sources/ContainerCommands/Image/ImageList.swift @@ -146,11 +146,11 @@ extension Application { static func validate(options: ListImageOptions) throws { if options.quiet && options.verbose { - throw ContainerizationError(.invalidArgument, message: "cannot use flag --quite and --verbose together") + throw ContainerizationError(.invalidArgument, message: "cannot use flag --quiet and --verbose together") } let modifier = options.quiet || options.verbose if modifier && options.format == .json { - throw ContainerizationError(.invalidArgument, message: "cannot use flag --quite or --verbose along with --format json") + throw ContainerizationError(.invalidArgument, message: "cannot use flag --quiet or --verbose along with --format json") } } diff --git a/Sources/ContainerCommands/Image/ImagePush.swift b/Sources/ContainerCommands/Image/ImagePush.swift index 35c50850..3bd57f71 100644 --- a/Sources/ContainerCommands/Image/ImagePush.swift +++ b/Sources/ContainerCommands/Image/ImagePush.swift @@ -34,7 +34,7 @@ extension Application { var progressFlags: Flags.Progress @Option( - name: [.customLong("arch"), .customShort("a")], + name: .shortAndLong, help: "Limit the push to the specified architecture" ) var arch: String? diff --git a/Sources/ContainerCommands/Image/ImageSave.swift b/Sources/ContainerCommands/Image/ImageSave.swift index 3ef7c41e..b7b9e0f1 100644 --- a/Sources/ContainerCommands/Image/ImageSave.swift +++ b/Sources/ContainerCommands/Image/ImageSave.swift @@ -27,11 +27,11 @@ extension Application { public init() {} public static let configuration = CommandConfiguration( commandName: "save", - abstract: "Save an image as an OCI compatible tar archive" + abstract: "Save one or more images as an OCI compatible tar archive" ) @Option( - name: [.customLong("arch"), .customShort("a")], + name: .shortAndLong, help: "Architecture for the saved image" ) var arch: String? diff --git a/Sources/ContainerCommands/Image/ImageTag.swift b/Sources/ContainerCommands/Image/ImageTag.swift index 2cc2992b..364d1a2e 100644 --- a/Sources/ContainerCommands/Image/ImageTag.swift +++ b/Sources/ContainerCommands/Image/ImageTag.swift @@ -24,10 +24,10 @@ extension Application { commandName: "tag", abstract: "Create a new reference for an existing image") - @Argument(help: "the existing image reference (format: image-name[:tag])") + @Argument(help: "The existing image reference (format: image-name[:tag])") var source: String - @Argument(help: "the new image reference") + @Argument(help: "The new image reference") var target: String @OptionGroup diff --git a/Sources/ContainerCommands/Volume/VolumeCreate.swift b/Sources/ContainerCommands/Volume/VolumeCreate.swift index 828157b1..f939f339 100644 --- a/Sources/ContainerCommands/Volume/VolumeCreate.swift +++ b/Sources/ContainerCommands/Volume/VolumeCreate.swift @@ -22,7 +22,7 @@ extension Application.VolumeCommand { public struct VolumeCreate: AsyncParsableCommand { public static let configuration = CommandConfiguration( commandName: "create", - abstract: "Create a volume" + abstract: "Create a new volume" ) @Option(name: .customLong("label"), help: "Set metadata for a volume") diff --git a/Sources/ContainerCommands/Volume/VolumeInspect.swift b/Sources/ContainerCommands/Volume/VolumeInspect.swift index 27ed6d28..9a922f29 100644 --- a/Sources/ContainerCommands/Volume/VolumeInspect.swift +++ b/Sources/ContainerCommands/Volume/VolumeInspect.swift @@ -28,7 +28,7 @@ extension Application.VolumeCommand { @OptionGroup var global: Flags.Global - @Argument(help: "Volume names") + @Argument(help: "Volumes to inspect") var names: [String] public init() {} diff --git a/docs/command-reference.md b/docs/command-reference.md index 68fda381..2f1b2b48 100644 --- a/docs/command-reference.md +++ b/docs/command-reference.md @@ -249,7 +249,7 @@ container stop [--all] [--signal ] [--time