const domain = { name : "domain" , generators : { script : "defaults domains" , postProcess : function ( out ) { return out . split ( "," ) . map ( ( domain ) => { return { name : domain . trim ( ) , } ; } ) ; } , } , suggestions : [ { name : "-globalDomain" , description : "Global domain" , } , { name : "-app" , insertValue : "-app '{cursor}'" , description : "Application name" , } , ] , } ; const key = { name : "key" , } ; const value = { name : "value" , } ; const valueArgs = [ { name : "-string" , args : { name : "string_value" , } , } , { name : "-data" , args : { name : "hex_digits" , } , } , { name : [ "-int" , "-integer" ] , args : { name : "integer_value" , } , } , { name : "-float" , args : { name : "floating-point_value" , } , } , { name : [ "-bool" , "-boolean" ] , args : { suggestions : [ { name : "true" , } , { name : "false" , } , { name : "yes" , } , { name : "no" , } , ] , } , } , { name : "-date" , args : { name : "date_rep" , } , } , { name : "-array" , args : { isVariadic : true , name : "array_item" , } , } , { name : "-array-add" , args : { isVariadic : true , name : "array_item" , } , } , ] ; const completionSpec = { name : "defaults" , description : "Command line interface to a user's defaults" , subcommands : [ { name : "read" , description : "Shows defaults" , args : [ domain , key ] , } , { name : "write" , description : "Writes key for domain" , args : [ domain , key , value ] , } , { name : "delete" , description : "Deletes domain or key in domain" , args : [ domain , key ] , } , { name : "rename" , description : "Renames old_key to new_key" , args : [ domain , { name : "old_key" , } , { name : "new_key" , } , ] , } , { name : "domains" , description : "Lists all domains" , } , { name : "find" , description : "Lists all entries containing word" , args : { name : "word" , description : "The word to search for" , } , } , { name : "help" , description : "Show help text" , } , { name : "read-type" , description : "Shows the type for the given domain, key" , args : [ domain , key ] , } , ] , } ; export default completionSpec ;