File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,27 @@ import com.github.ajalt.clikt.parameters.arguments.argument
88import com.github.ajalt.clikt.parameters.arguments.help
99import com.github.ajalt.clikt.parameters.arguments.multiple
1010import com.github.ajalt.clikt.parameters.options.flag
11+ import com.github.ajalt.clikt.parameters.options.help
1112import com.github.ajalt.clikt.parameters.options.option
1213import processing.app.ui.Start
1314
1415class Processing : SuspendingCliktCommand (" processing" ){
16+ val version by option(" -v" ," --version" )
17+ .flag()
18+ .help(" Print version information" )
19+
1520 val sketches by argument()
1621 .multiple(default = emptyList())
1722 .help(" Sketches to open" )
1823
1924 override fun help (context : Context ) = " Start the Processing IDE"
2025 override val invokeWithoutSubcommand = true
2126 override suspend fun run () {
27+ if (version){
28+ println (" processing-${Base .getVersionName()} -${Base .getRevision()} " )
29+ return
30+ }
31+
2232 val subcommand = currentContext.invokedSubcommand
2333 if (subcommand == null ) {
2434 Start .main(sketches.toTypedArray())
You can’t perform that action at this time.
0 commit comments