Skip to content

Commit 5e7ef93

Browse files
authored
Merge pull request swiftlang#160 from allevato/short-and-long-mode
Add back the short forms of `--mode` (`-m`) and `--version` (`-v`).
2 parents ce6a169 + 661c7e4 commit 5e7ef93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/swift-format/CommandLineOptions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct SwiftFormatCommand: ParsableCommand {
5050
///
5151
/// If not specified, the tool will be run in format mode.
5252
@Option(
53+
name: .shortAndLong,
5354
default: .format,
5455
help: "The mode to run swift-format in. Either 'format', 'lint', or 'dump-configuration'.")
5556
var mode: ToolMode
@@ -74,7 +75,7 @@ struct SwiftFormatCommand: ParsableCommand {
7475
@Argument(help: "One or more input filenames")
7576
var paths: [String]
7677

77-
@Flag(help: "Print the version and exit")
78+
@Flag(name: .shortAndLong, help: "Print the version and exit")
7879
var version: Bool
7980

8081
@Flag(help: .hidden) var debugDisablePrettyPrint: Bool

0 commit comments

Comments
 (0)