File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 11import type { CommandModule } from "yargs"
22
3- export function cmd < T , U > ( input : CommandModule < T , U > ) {
3+ type WithDoubleDash < T > = T & { "--" ?: string [ ] }
4+
5+ export function cmd < T , U > ( input : CommandModule < T , WithDoubleDash < U > > ) {
46 return input
57}
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export const RunCommand = cmd({
8888 } )
8989 } ,
9090 handler : async ( args ) => {
91- let message = args . message . join ( " " )
91+ let message = [ ... args . message , ... ( args [ "--" ] || [ ] ) ] . join ( " " )
9292
9393 const fileParts : any [ ] = [ ]
9494 if ( args . file ) {
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ process.on("uncaughtException", (e) => {
3939} )
4040
4141const cli = yargs ( hideBin ( process . argv ) )
42+ . parserConfiguration ( { "populate--" : true } )
4243 . scriptName ( "opencode" )
4344 . help ( "help" , "show help" )
4445 . alias ( "help" , "h" )
You can’t perform that action at this time.
0 commit comments