-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add completion and no-op for new command types (#556)
- Loading branch information
Showing
10 changed files
with
149 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...ordant/src/commonMain/kotlin/com/github/ajalt/clikt/command/SuspendingNoOpCliktCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.ajalt.clikt.command | ||
|
||
/** | ||
* A [SuspendingCliktCommand] that has a default implementation of | ||
* [run][SuspendingCliktCommand.run] that is a no-op. | ||
*/ | ||
abstract class SuspendingNoOpCliktCommand( | ||
/** | ||
* The name of the program to use in the help output. If not given, it is inferred from the | ||
* class name. | ||
*/ | ||
name: String? = null, | ||
) : SuspendingCliktCommand(name) { | ||
override suspend fun run() = Unit | ||
} |
2 changes: 1 addition & 1 deletion
2
clikt-mordant/src/commonMain/kotlin/com/github/ajalt/clikt/core/NoOpCliktCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
clikt/src/commonMain/kotlin/com/github/ajalt/clikt/command/CoreSuspendingNoOpCliktCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.ajalt.clikt.command | ||
|
||
/** | ||
* A [CoreSuspendingCliktCommand] that has a default implementation of | ||
* [run][CoreSuspendingCliktCommand.run] that is a no-op. | ||
*/ | ||
abstract class CoreSuspendingNoOpCliktCommand( | ||
/** | ||
* The name of the program to use in the help output. If not given, it is inferred from the | ||
* class name. | ||
*/ | ||
name: String? = null, | ||
) : CoreSuspendingCliktCommand(name) { | ||
override suspend fun run() = Unit | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters