Skip to content

Commit 383dd21

Browse files
committed
Reword uses of "iff" in completions code.
Redid a comment as a DocC. Signed-off-by: Ross Goldberg <[email protected]>
1 parent df46a52 commit 383dd21

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Sources/ArgumentParser/Completions/CompletionsGenerator.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ extension ParsableCommand {
173173
}
174174

175175
extension [ParsableCommand.Type] {
176-
// Include default 'help' subcommand in nonempty subcommand list iff no help subcommand already exists.
177-
mutating func addHelpSubcommandIffMissing() {
176+
/// Include default 'help' subcommand in nonempty subcommand list if & only if
177+
/// no help subcommand already exists.
178+
mutating func addHelpSubcommandIfMissing() {
178179
if !isEmpty && allSatisfy({ $0._commandName != "help" }) {
179180
append(HelpCommand.self)
180181
}

Sources/ArgumentParser/Completions/ZshCompletionsGenerator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extension [ParsableCommand.Type] {
5555
argumentSpecs.append("'(-)*:: :->arg'")
5656

5757
if isRootCommand {
58-
subcommands.addHelpSubcommandIffMissing()
58+
subcommands.addHelpSubcommandIfMissing()
5959
}
6060

6161
subcommandHandler = """

0 commit comments

Comments
 (0)