Skip to content

Commit 1e49dbc

Browse files
Rename back to swift package completion-tool
The subcommand seems accidentally renamed to `swift package completion-command` while renaming the type name in #7336 This change renames it back to `swift package completion-tool` keep compatibility with the previous version.
1 parent ad7b5ce commit 1e49dbc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Sources/Commands/PackageCommands/CompletionCommand.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import var TSCBasic.stdoutStream
1818
extension SwiftPackageCommand {
1919
struct CompletionCommand: SwiftCommand {
2020
static let configuration = CommandConfiguration(
21+
commandName: "completion-tool",
2122
abstract: "Completion command (for shell completions)"
2223
)
2324

Tests/CommandsTests/PackageCommandTests.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ final class PackageCommandTests: CommandsTestCase {
7070
XCTAssertMatch(stdout, .contains("Swift Package Manager"))
7171
}
7272

73+
func testCompletionTool() throws {
74+
let stdout = try execute(["completion-tool", "--help"]).stdout
75+
XCTAssertMatch(stdout, .contains("OVERVIEW: Completion command (for shell completions)"))
76+
}
77+
7378
func testInitOverview() throws {
7479
let stdout = try execute(["init", "--help"]).stdout
7580
XCTAssertMatch(stdout, .contains("OVERVIEW: Initialize a new package"))

0 commit comments

Comments
 (0)