1
0
Форкнуть 0

Added argument completions for all commands

This commit is contained in:
Wade Wegner 2018-01-07 13:26:38 -08:00
Родитель 17e81a53ea
Коммит 4c1af8b097
3 изменённых файлов: 881 добавлений и 18 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -1 +1,2 @@
commands-list.json
commands-list.json
commands-display.json

843
_sfdx
Просмотреть файл

@ -102,19 +102,834 @@ fi
local -a _command_args
case "$words[1]" in
force:lightning:component:create)
_command_args=(
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(-n|--componentname)'{-n,--componentname}'[(required) name of the generated Lightning component]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-t|--template)'{-t,--template}'[template to use for file creation]' \
)
;;
esac
force:limits:api:display)
_command_args=(
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:lightning:app:create)
_command_args=(
'(-n|--appname)'{-n,--appname}'[name of the generated Lightning app]' \
'(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningApp*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:bulk:delete)
_command_args=(
'(-s|--sobjecttype)'{-s,--sobjecttype}'[the sObject type of the records youre deleting]' \
'(-f|--csvfile)'{-f,--csvfile}'[the path to the CSV file containing the ids of the records to delete]' \
'(-w|--wait)'{-w,--wait}'[the number of minutes to wait for the command to complete before displaying the results]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:bulk:status)
_command_args=(
'(-i|--jobid)'{-i,--jobid}'[the ID of the job you want to view or of the job whose batch you want to view]' \
'(-b|--batchid)'{-b,--batchid}'[the ID of the batch whose status you want to view]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:bulk:upsert)
_command_args=(
'(-s|--sobjecttype)'{-s,--sobjecttype}'[the sObject type of the records you want to upsert]' \
'(-f|--csvfile)'{-f,--csvfile}'[the path to the CSV file that defines the records to upsert]' \
'(-i|--externalid)'{-i,--externalid}'[the column name of the external ID; if not provided, an arbitrary ID is used]' \
'(-w|--wait)'{-w,--wait}'[the number of minutes to wait for the command to complete before displaying the results]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:apex:class:create)
_command_args=(
'(-n|--classname)'{-n,--classname}'[name of the generated Apex class]' \
'(-t|--template)'{-t,--template}'[template to use for file creation (DefaultApexClass*,ApexException,ApexUnitTest,InboundEmailService)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:doc:commands:display)
_command_args=(
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:doc:commands:list)
_command_args=(
'(-u|--usage)'{-u,--usage}'[list only docopts usage strings]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:visualforce:component:create)
_command_args=(
'(-t|--template)'{-t,--template}'[template to use for file creation (DefaultVFComponent*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-n|--componentname)'{-n,--componentname}'[name of the generated Visualforce component]' \
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(-l|--label)'{-l,--label}'[Visualforce component label]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:lightning:component:create)
_command_args=(
'(-n|--componentname)'{-n,--componentname}'[name of the generated Lightning component]' \
'(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningCmp*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:mdapi:convert)
_command_args=(
'(-r|--rootdir)'{-r,--rootdir}'[the root directory containing the Metadata API source]' \
'(-d|--outputdir)'{-d,--outputdir}'[the output directory to store the sfdx source]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:source:convert)
_command_args=(
'(-r|--rootdir)'{-r,--rootdir}'[the source directory for the source to be converted]' \
'(-d|--outputdir)'{-d,--outputdir}'[the output directory to export the Metadata API source to]' \
'(-n|--packagename)'{-n,--packagename}'[the name of the package to associate with the Metadata API source]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:org:create)
_command_args=(
'(-f|--definitionfile)'{-f,--definitionfile}'[path to a scratch org definition file]' \
'(-j|--definitionjson)'{-j,--definitionjson}'[scratch org definition in json format ]' \
'(-n|--nonamespace)'{-n,--nonamespace}'[creates the scratch org with no namespace]' \
'(-c|--noancestors)'{-c,--noancestors}'[do not include second-generation package ancestors in the scratch org]' \
'(-i|--clientid)'{-i,--clientid}'[connected app consumer key]' \
'(-s|--setdefaultusername)'{-s,--setdefaultusername}'[set the created org as the default username]' \
'(-a|--setalias)'{-a,--setalias}'[set an alias for for the created scratch org]' \
'(-e|--env)'{-e,--env}'[environment where the scratch org is created: [sandbox*,virtual,prototype] (sandbox*,virtual,prototype)]' \
'(-w|--wait)'{-w,--wait}'[the streaming client socket timeout (in minutes) (default:6, min:2)]' \
'(-d|--durationdays)'{-d,--durationdays}'[duration of the scratch org (in days) (default:7, min:1, max:30)]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package2:create)
_command_args=(
'(-n|--name)'{-n,--name}'[package name]' \
'(-o|--containeroptions)'{-o,--containeroptions}'[[*Managed | Unlocked | Locked] container options for the package (Managed=DeveloperManagedSubscriberManaged, Unlocked=DeveloperControlledSubscriberEditable, Locked=DeveloperControlledSubscriberLocked)]' \
'(-d|--description)'{-d,--description}'[package description]' \
'(-e|--nonamespace)'{-e,--nonamespace}'[creates the package with no namespace; available only for developer-controlled packages.]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:user:create)
_command_args=(
'(-f|--definitionfile)'{-f,--definitionfile}'[file path to a user definition]' \
'(-a|--setalias)'{-a,--setalias}'[set an alias for the created username to reference within the CLI]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:project:create)
_command_args=(
'(-n|--projectname)'{-n,--projectname}'[name of the generated project]' \
'(-t|--template)'{-t,--template}'[template to use for file creation (Defaultsfdx-project.json*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-l|--loginurl)'{-l,--loginurl}'[Salesforce instance login URL (https://login.salesforce.com*)]' \
'(-x|--sourceapiversion)'{-x,--sourceapiversion}'[source API version number (41.0*)]' \
'(-s|--namespace)'{-s,--namespace}'[project associated namespace]' \
'(-p|--defaultpackagedir)'{-p,--defaultpackagedir}'[default package directory name (force-app*)]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:org:delete)
_command_args=(
'(-p|--noprompt)'{-p,--noprompt}'[no prompt to confirm deletion]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:mdapi:deploy)
_command_args=(
'(-c|--checkonly)'{-c,--checkonly}'[validate deploy but dont save to the org (default:false)]' \
'(-d|--deploydir)'{-d,--deploydir}'[root of directory tree of files to deploy]' \
'(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: 0)]' \
'(-i|--jobid)'{-i,--jobid}'[WARNING: The flag "jobid" has been deprecated and will be removed in v41.01.0 or later. Instead, use "sfdx force:mdapi:deploy:report -i <jobId>".]' \
'(-l|--testlevel)'{-l,--testlevel}'[deployment testing level (NoTestRun,RunSpecifiedTests,RunLocalTests,RunAllTestsInOrg)]' \
'(-r|--runtests)'{-r,--runtests}'[tests to run if --testlevel RunSpecifiedTests]' \
'(-e|--rollbackonerror)'{-e,--rollbackonerror}'[WARNING: The flag "rollbackonerror" has been deprecated and will be removed in v41.01.0 or later. Instead, use "ignoreerrors".]' \
'(-o|--ignoreerrors)'{-o,--ignoreerrors}'[ignore any errors and do not roll back deployment (default:false)]' \
'(-g|--ignorewarnings)'{-g,--ignorewarnings}'[whether a warning will allow a deployment to complete successfully (default:false)]' \
'(-f|--zipfile)'{-f,--zipfile}'[path to .zip file of metadata to deploy]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[verbose output of deploy results]' \
)
;;
force:mdapi:deploy:report)
_command_args=(
'(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: 0)]' \
'(-i|--jobid)'{-i,--jobid}'[job ID of the deployment you want to check]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[verbose output of deploy results]' \
)
;;
force:org:display)
_command_args=(
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[emit additional command output to stdout]' \
)
;;
force:user:display)
_command_args=(
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:lightning:event:create)
_command_args=(
'(-n|--eventname)'{-n,--eventname}'[name of the generated Lightning event]' \
'(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningEvt*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:apex:execute)
_command_args=(
'(-f|--apexcodefile)'{-f,--apexcodefile}'[path to a local file containing Apex code]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:config:get)
_command_args=(
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[emit additional command output to stdout]' \
)
;;
force:package:install)
_command_args=(
'(-i|--id)'{-i,--id}'[ID of the package version to install (starts with 04t)]' \
'(-w|--wait)'{-w,--wait}'[number of minutes to wait for installation status]' \
'(-k|--installationkey)'{-k,--installationkey}'[installation key for key-protected package (default: null)]' \
'(-p|--publishwait)'{-p,--publishwait}'[number of minutes to wait for subscriber package version ID to become available in the target org]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package:install:get)
_command_args=(
'(-i|--requestid)'{-i,--requestid}'[ID of the package install request you want to check]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package:installed:list)
_command_args=(
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:lightning:interface:create)
_command_args=(
'(-n|--interfacename)'{-n,--interfacename}'[name of the generated Lightning interface]' \
'(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningIntf*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:auth:jwt:grant)
_command_args=(
'(-u|--username)'{-u,--username}'[authentication username]' \
'(-f|--jwtkeyfile)'{-f,--jwtkeyfile}'[path to a file containing the private key]' \
'(-i|--clientid)'{-i,--clientid}'[OAuth client ID (sometimes called the consumer key)]' \
'(-r|--instanceurl)'{-r,--instanceurl}'[the login URL of the instance the org lives on]' \
'(-d|--setdefaultdevhubusername)'{-d,--setdefaultdevhubusername}'[set the authenticated org as the default dev hub org for scratch org creation]' \
'(-s|--setdefaultusername)'{-s,--setdefaultusername}'[set the authenticated org as the default username that all commands run against]' \
'(-a|--setalias)'{-a,--setalias}'[set an alias for the authenticated org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:lightning:lint)
_command_args=(
'(-i|--ignore)'{-i,--ignore}'[pattern used to ignore some folders]' \
'(--files)--files[pattern used to include specific files]' \
'(-j|--json)'{-j,--json}'[format output as JSON]' \
'(--config)--config[path to a custom ESLint configuration file]' \
'(--verbose)--verbose[report warnings in addition to errors]' \
'(--exit)--exit[exit with error code 1 if there are lint issues]' \
)
;;
force:alias:list)
_command_args=(
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:config:list)
_command_args=(
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:org:list)
_command_args=(
'(--all)--all[include expired, deleted, and unknown-status scratch orgs]' \
'(--clean)--clean[remove all local org authorizations for non-active orgs]' \
'(-p|--noprompt)'{-p,--noprompt}'[do not prompt for confirmation]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[list more information about each org]' \
)
;;
force:package2:list)
_command_args=(
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:user:list)
_command_args=(
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:apex:log:get)
_command_args=(
'(-i|--logid)'{-i,--logid}'[ID of the log to display]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:apex:log:list)
_command_args=(
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:org:open)
_command_args=(
'(-p|--path)'{-p,--path}'[navigation URL path]' \
'(-r|--urlonly)'{-r,--urlonly}'[display navigation URL, but dont launch browser]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:source:open)
_command_args=(
'(-f|--sourcefile)'{-f,--sourcefile}'[file to edit]' \
'(-r|--urlonly)'{-r,--urlonly}'[generate a navigation URL; dont launch the editor]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:visualforce:page:create)
_command_args=(
'(-t|--template)'{-t,--template}'[template to use for file creation (DefaultVFPage*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-n|--pagename)'{-n,--pagename}'[name of the generated Visualforce page]' \
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(-l|--label)'{-l,--label}'[Visualforce page label]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:user:password:generate)
_command_args=(
'(-o|--onbehalfof)'{-o,--onbehalfof}'[comma-separated list of usernames for which to generate passwords]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:user:permset:assign)
_command_args=(
'(-n|--permsetname)'{-n,--permsetname}'[the name of the permission set to assign]' \
'(-o|--onbehalfof)'{-o,--onbehalfof}'[comma-separated list of usernames or aliases to assign the permission set to]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:source:pull)
_command_args=(
'(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: 33) (default:33, min:1)]' \
'(-f|--forceoverwrite)'{-f,--forceoverwrite}'[ignore conflict warnings and overwrite changes to the project]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:source:push)
_command_args=(
'(-f|--forceoverwrite)'{-f,--forceoverwrite}'[ignore conflict warnings and overwrite changes to scratch org]' \
'(-g|--ignorewarnings)'{-g,--ignorewarnings}'[deploy changes even if warnings are generated]' \
'(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: 33) (default:33, min:1)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:record:create)
_command_args=(
'(-s|--sobjecttype)'{-s,--sobjecttype}'[the type of the record youre creating]' \
'(-v|--values)'{-v,--values}'[the <fieldName>=<value> pairs youre creating]' \
'(-t|--usetoolingapi)'{-t,--usetoolingapi}'[create the record with tooling api]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:record:delete)
_command_args=(
'(-s|--sobjecttype)'{-s,--sobjecttype}'[the type of the record youre deleting]' \
'(-i|--sobjectid)'{-i,--sobjectid}'[the ID of the record youre deleting]' \
'(-w|--where)'{-w,--where}'[a list of <fieldName>=<value> pairs to search for]' \
'(-t|--usetoolingapi)'{-t,--usetoolingapi}'[delete the record with Tooling API]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:record:get)
_command_args=(
'(-s|--sobjecttype)'{-s,--sobjecttype}'[the type of the record youre retrieving]' \
'(-i|--sobjectid)'{-i,--sobjectid}'[the ID of the record youre retrieving]' \
'(-w|--where)'{-w,--where}'[a list of <fieldName>=<value> pairs to search for]' \
'(-t|--usetoolingapi)'{-t,--usetoolingapi}'[retrieve the record with Tooling API]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:record:update)
_command_args=(
'(-s|--sobjecttype)'{-s,--sobjecttype}'[the type of the record youre updating]' \
'(-i|--sobjectid)'{-i,--sobjectid}'[the ID of the record youre updating]' \
'(-w|--where)'{-w,--where}'[a list of <fieldName>=<value> pairs to search for]' \
'(-v|--values)'{-v,--values}'[the <fieldName>=<value> pairs youre updating]' \
'(-t|--usetoolingapi)'{-t,--usetoolingapi}'[update the record with Tooling API]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:mdapi:retrieve)
_command_args=(
'(-a|--apiversion)'{-a,--apiversion}'[target API version for the retrieve (default 41.0)]' \
'(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: -1 (no limit))]' \
'(-r|--retrievetargetdir)'{-r,--retrievetargetdir}'[directory root for the retrieved files]' \
'(-k|--unpackaged)'{-k,--unpackaged}'[file path of manifest of components to retrieve]' \
'(-d|--sourcedir)'{-d,--sourcedir}'[source dir to use instead of default manifest sfdx-project.xml]' \
'(-p|--packagenames)'{-p,--packagenames}'[a comma-separated list of packages to retrieve]' \
'(-s|--singlepackage)'{-s,--singlepackage}'[a single-package retrieve (default: false)]' \
'(-i|--jobid)'{-i,--jobid}'[WARNING: The flag "jobid" has been deprecated and will be removed in v41.01.0 or later. Instead, use "sfdx force:mdapi:retrieve:report -i <jobId> -r <targetDir>".]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[verbose output of retrieve result]' \
)
;;
force:mdapi:retrieve:report)
_command_args=(
'(-w|--wait)'{-w,--wait}'[wait time for command to finish in minutes (default: -1 (no limit))]' \
'(-r|--retrievetargetdir)'{-r,--retrievetargetdir}'[directory root for the retrieved files]' \
'(-i|--jobid)'{-i,--jobid}'[job ID of the retrieve you want to check]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[verbose output of retrieve result]' \
)
;;
force:alias:set)
_command_args=(
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:config:set)
_command_args=(
'(-g|--global)'{-g,--global}'[set config var globally (to be used from any directory)]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:auth:sfdxurl:store)
_command_args=(
'(-f|--sfdxurlfile)'{-f,--sfdxurlfile}'[path to a file containing the sfdx url]' \
'(-d|--setdefaultdevhubusername)'{-d,--setdefaultdevhubusername}'[set the authenticated org as the default dev hub org for scratch org creation]' \
'(-s|--setdefaultusername)'{-s,--setdefaultusername}'[set the authenticated org as the default username that all commands run against]' \
'(-a|--setalias)'{-a,--setalias}'[set an alias for the authenticated org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:org:shape:create)
_command_args=(
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:org:shape:delete)
_command_args=(
'(-p|--noprompt)'{-p,--noprompt}'[do not prompt for confirmation]' \
'(-u|--targetusername)'{-u,--targetusername}'[username for the target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:org:shape:list)
_command_args=(
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[list more information about each org shape]' \
)
;;
force:schema:sobject:describe)
_command_args=(
'(-s|--sobjecttype)'{-s,--sobjecttype}'[the API name of the object to describe]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:schema:sobject:list)
_command_args=(
'(-c|--sobjecttypecategory)'{-c,--sobjecttypecategory}'[the type of objects to list (all|custom|standard)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:soql:query)
_command_args=(
'(-q|--query)'{-q,--query}'[SOQL query to execute]' \
'(-t|--usetoolingapi)'{-t,--usetoolingapi}'[execute query with Tooling API]' \
'(-r|--resultformat)'{-r,--resultformat}'[query result format emitted to stdout; --json flag overrides this parameter (human*,csv,json)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:source:status)
_command_args=(
'(-a|--all)'{-a,--all}'[list all the changes that have been made]' \
'(-l|--local)'{-l,--local}'[list the changes that have been made locally]' \
'(-r|--remote)'{-r,--remote}'[list the changes that have been made in the scratch org]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:lightning:test:create)
_command_args=(
'(-n|--testname)'{-n,--testname}'[name of the generated Lightning test]' \
'(-t|--template)'{-t,--template}'[template to use for file creation (DefaultLightningTest*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:lightning:test:install)
_command_args=(
'(-w|--wait)'{-w,--wait}'[number of minutes to wait for installation status (default:2)]' \
'(-r|--releaseversion)'{-r,--releaseversion}'[release version of Lightning Testing Service (default:latest)]' \
'(-t|--packagetype)'{-t,--packagetype}'[type of unmanaged package. 'full' option contains both jasmine and mocha, plus examples (full*,jasmine,mocha)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:apex:test:report)
_command_args=(
'(-i|--testrunid)'{-i,--testrunid}'[ID of test run]' \
'(-c|--codecoverage)'{-c,--codecoverage}'[retrieve code coverage results]' \
'(-d|--outputdir)'{-d,--outputdir}'[directory to store test run files]' \
'(-r|--resultformat)'{-r,--resultformat}'[test result format emitted to stdout; --json flag overrides this parameter (human*,tap,junit,json)]' \
'(-w|--wait)'{-w,--wait}'[the streaming client socket timeout (in minutes) (default:6, min:2)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[display Apex test processing details]' \
)
;;
force:apex:test:run)
_command_args=(
'(-n|--classnames)'{-n,--classnames}'[comma-separated list of Apex test class names to execute]' \
'(-s|--suitenames)'{-s,--suitenames}'[comma-separated list of Apex test suite names to execute]' \
'(-c|--codecoverage)'{-c,--codecoverage}'[retrieve code coverage results]' \
'(-d|--outputdir)'{-d,--outputdir}'[directory to store test run files]' \
'(-l|--testlevel)'{-l,--testlevel}'[testlevel enum value (RunLocalTests,RunAllTestsInOrg,RunSpecifiedTests)]' \
'(-r|--resultformat)'{-r,--resultformat}'[test result format emitted to stdout; --json flag overrides this parameter (human*,tap,junit,json)]' \
'(-w|--wait)'{-w,--wait}'[the streaming client socket timeout (in minutes) (default:6, min:2)]' \
'(--precompilewait)--precompilewait[how long to wait (in minutes) for Apex pre-compilation (default:3, min:3)]' \
'(-y|--synchronous)'{-y,--synchronous}'[run tests from a single class synchronously]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[display Apex test processing details]' \
)
;;
force:lightning:test:run)
_command_args=(
'(-a|--appname)'{-a,--appname}'[name of your Lightning test application]' \
'(-d|--outputdir)'{-d,--outputdir}'[directory path to store test run artifacts: for example, log files and test results]' \
'(-r|--resultformat)'{-r,--resultformat}'[test result format emitted to stdout; --json flag overrides this parameter (human*,tap,junit,json)]' \
'(-f|--configfile)'{-f,--configfile}'[path to config file for the test]' \
'(-o|--leavebrowseropen)'{-o,--leavebrowseropen}'[leave browser open]' \
'(-t|--timeout)'{-t,--timeout}'[time (ms) to wait for results element in dom (default:60000)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:tree:export)
_command_args=(
'(-q|--query)'{-q,--query}'[soql query, or filepath of file containing a soql query, to retrieve records]' \
'(-p|--plan)'{-p,--plan}'[generate mulitple sobject tree files and a plan definition file for aggregated import]' \
'(-x|--prefix)'{-x,--prefix}'[prefix of generated files]' \
'(-d|--outputdir)'{-d,--outputdir}'[directory to store files]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:data:tree:import)
_command_args=(
'(-f|--sobjecttreefiles)'{-f,--sobjecttreefiles}'[comma-delimited, ordered paths of json files containing collection of record trees to insert]' \
'(-p|--plan)'{-p,--plan}'[path to plan to insert multiple data files that have master-detail relationships]' \
'(-c|--contenttype)'{-c,--contenttype}'[if data file extension is not .json, provide content type (applies to all files)]' \
'(--confighelp)--confighelp[display schema information for the --plan configuration file to stdout; if you use this option, all other options except --json are ignored]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:apex:trigger:create)
_command_args=(
'(-n|--triggername)'{-n,--triggername}'[name of the generated Apex trigger]' \
'(-t|--template)'{-t,--template}'[template to use for file creation (ApexTrigger*)]' \
'(-d|--outputdir)'{-d,--outputdir}'[folder for saving the created files]' \
'(-r|--reflect)'{-r,--reflect}'[switch to return flag detailed information]' \
'(-a|--apiversion)'{-a,--apiversion}'[API version number (41.0*,40.0)]' \
'(-s|--sobject)'{-s,--sobject}'[sObject to create a trigger on (SOBJECT*)]' \
'(-e|--triggerevents)'{-e,--triggerevents}'[events that fire the trigger (before insert*,before upsert,before delete,after insert,after upsert,after delete,after undelete)]' \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package:uninstall)
_command_args=(
'(-i|--id)'{-i,--id}'[ID of the package to uninstall (starts with 04t)]' \
'(-w|--wait)'{-w,--wait}'[number of minutes to wait for uninstall status]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package:uninstall:get)
_command_args=(
'(-i|--requestid)'{-i,--requestid}'[ID of the package uninstall request you want to check]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package2:update)
_command_args=(
'(-i|--package2id)'{-i,--package2id}'[id of the package (starts with 0Ho)]' \
'(-n|--name)'{-n,--name}'[package name]' \
'(-d|--description)'{-d,--description}'[package description]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:project:upgrade)
_command_args=(
'(-f|--forceupgrade)'{-f,--forceupgrade}'[run all upgrades even if project has already been upgraded]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package1:version:create)
_command_args=(
'(-i|--packageid)'{-i,--packageid}'[ID of the metadata package (starts with 033) of which youre creating a new version]' \
'(-n|--name)'{-n,--name}'[package version name]' \
'(-d|--description)'{-d,--description}'[package version description]' \
'(-v|--version)'{-v,--version}'[package version in major.minor format, for example, 3.2]' \
'(-m|--managedreleased)'{-m,--managedreleased}'[create a managed package version]' \
'(-r|--releasenotesurl)'{-r,--releasenotesurl}'[release notes URL]' \
'(-p|--postinstallurl)'{-p,--postinstallurl}'[post install URL]' \
'(-k|--installationkey)'{-k,--installationkey}'[installation key for key-protected package (default: null)]' \
'(-w|--wait)'{-w,--wait}'[minutes to wait for the package version to be created (default: 2 minutes)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package2:version:create)
_command_args=(
'(-i|--package2id)'{-i,--package2id}'[ID of the parent package (starts with 0Ho)]' \
'(-d|--directory)'{-d,--directory}'[path to directory that contains the contents of the package version]' \
'(-b|--branch)'{-b,--branch}'[the package versions branch]' \
'(-t|--tag)'{-t,--tag}'[the package versions tag]' \
'(-k|--installationkey)'{-k,--installationkey}'[installation key for key-protected package (default: null)]' \
'(-p|--preserve)'{-p,--preserve}'[temp files are preserved that would otherwise be deleted]' \
'(-j|--validateschema)'{-j,--validateschema}'[sfdx-project.json is validated against JSON schema]' \
'(-w|--wait)'{-w,--wait}'[minutes to wait for the package version to be created (default:0)]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package1:version:create:get)
_command_args=(
'(-i|--requestid)'{-i,--requestid}'[PackageUploadRequest ID]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package2:version:create:get)
_command_args=(
'(-i|--package2createrequestid)'{-i,--package2createrequestid}'[package2 version creation request ID (starts with 08c)]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package2:version:create:list)
_command_args=(
'(-c|--createdlastdays)'{-c,--createdlastdays}'[created in the last specified number of days (starting at 00:00:00 of first day to now; 0 for today)]' \
'(-s|--status)'{-s,--status}'[filter the list by version creation request status (Queued,InProgress,Success,Error)]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package1:version:display)
_command_args=(
'(-i|--packageversionid)'{-i,--packageversionid}'[metadata package version ID (starts with 04t)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package2:version:get)
_command_args=(
'(-i|--package2versionid)'{-i,--package2versionid}'[the package version ID (starts wtih 05i)]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package1:version:list)
_command_args=(
'(-i|--packageid)'{-i,--packageid}'[metadata package ID (starts with 033)]' \
'(-u|--targetusername)'{-u,--targetusername}'[username or alias for the target org; overrides default target org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:package2:version:list)
_command_args=(
'(-c|--createdlastdays)'{-c,--createdlastdays}'[created in the last specified number of days (starting at 00:00:00 of first day to now; 0 for today)]' \
'(-m|--modifiedlastdays)'{-m,--modifiedlastdays}'[list items modified in the specified last number of days (starting at 00:00:00 of first day to now; 0 for today)]' \
'(-i|--package2ids)'{-i,--package2ids}'[filter results on specified comma-delimited package2 ids (start with 0Ho)]' \
'(-r|--released)'{-r,--released}'[display released versions only]' \
'(-o|--orderby)'{-o,--orderby}'[order by the specified package2 version fields]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--concise)--concise[display limited package2 version details]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
'(--verbose)--verbose[display extended package2 versions detail]' \
)
;;
force:package2:version:update)
_command_args=(
'(-i|--package2versionid)'{-i,--package2versionid}'[the package version ID (starts wtih 05i)]' \
'(-n|--name)'{-n,--name}'[the package version name]' \
'(-d|--description)'{-d,--description}'[the package version description]' \
'(-b|--branch)'{-b,--branch}'[the package version branch]' \
'(-t|--tag)'{-t,--tag}'[the package version tag]' \
'(-k|--installationkey)'{-k,--installationkey}'[installation key for key-protected package (default: null)]' \
'(-s|--setasreleased)'{-s,--setasreleased}'[set the package version as released (cant be undone)]' \
'(-v|--targetdevhubusername)'{-v,--targetdevhubusername}'[username or alias for the dev hub org; overrides default dev hub org]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
force:auth:web:login)
_command_args=(
'(-i|--clientid)'{-i,--clientid}'[OAuth client ID (sometimes called the consumer key)]' \
'(-r|--instanceurl)'{-r,--instanceurl}'[the login URL of the instance the org lives on]' \
'(-d|--setdefaultdevhubusername)'{-d,--setdefaultdevhubusername}'[set the authenticated org as the default dev hub org for scratch org creation]' \
'(-s|--setdefaultusername)'{-s,--setdefaultusername}'[set the authenticated org as the default username that all commands run against]' \
'(-a|--setalias)'{-a,--setalias}'[set an alias for the authenticated org]' \
'(--disablemasking)--disablemasking[disable masking of user input (for use with problematic terminals)]' \
'(--json)--json[format output as json]' \
'(--loglevel)--loglevel[logging level for this command invocation (error*,trace,debug,info,warn,fatal)]' \
)
;;
esac
_arguments \
$_command_args \
'(--json)--json[JSON output]' \
'(--loglevel)--loglevel[logging level for this command invocation]' \
'(--help)--help[help about the current command]' \
&& return 0
$_command_args \
&& return 0

Просмотреть файл

@ -4,6 +4,7 @@ export FORCE_SHOW_SPINNER=
# create the commands-list.json file
sfdx force:doc:commands:list --json | jq -r .result > commands-list.json
sfdx force:doc:commands:display --json | jq '.result[] | select((.command) != null)' > commands-display.json
completion=""
completion+="#compdef sfdx"
@ -11,7 +12,7 @@ completion+="#compdef sfdx"
# header
completion+="\n"
completion+="\n# DESCRIPTION: Zsh completion script for the Salesforce CLI"
completion+="\n# AUTHOR: Wade Wegner (@WadeWegner)"
completion+="\n# AUTHOR: Wade Wegner"
completion+="\n# REPO: https://github.com/wadewegner/salesforce-cli-zsh-completion"
completion+="\n# LICENSE: https://github.com/wadewegner/salesforce-cli-zsh-completion/blob/master/LICENSE"
completion+="\n"
@ -20,12 +21,10 @@ completion+="\n"
completion+="\n_1st_arguments=("
commands=""
while read name description
do
name="$(echo $name | sed -e 's/:/\\:/g')"
commands="${commands}\n\t\"$name\":\"$description\""
done <<< "$(jq -r 'to_entries[] | "\(.value.name)\t\(.value.description)"' commands-list.json)"
completion+=$commands
@ -39,4 +38,52 @@ completion+="\n return"
completion+="\nfi"
completion+="\n"
completion+="\nlocal -a _command_args"
completion+="\ncase \"\$words[1]\" in"
while read delimitedFullCommand
do
fullCommandArray=($delimitedFullCommand)
topic=${fullCommandArray[0]}
command=${fullCommandArray[1]}
fullCommand=$topic:$command
completion+="\n $fullCommand)"
completion+="\n _command_args=("
delimitedFlags=$(jq -r '. | select((.command == "'$command'") and (.topic == "'$topic'")) | .flags | .[] | .name + "\t" + .description + "\t" + .char' commands-display.json) #echo "jqFlags: " $delimitedFlags
IFS=$'\n'
flagArray=($delimitedFlags)
IFS=$'\t'
for flagArrayRow in "${flagArray[@]}"
do
flagArray2=($flagArrayRow)
flagName=${flagArray2[0]}
flagDescription=${flagArray2[1]}
flagChar=${flagArray2[2]}
if [ "$flagChar" != "" ]
then
completion+="\n '(-"$flagChar"|--"$flagName")'{-"$flagChar",--"$flagName"}'["$flagDescription"]' \\\\"
else
completion+="\n '(--"$flagName")--"$flagName"["$flagDescription"]' \\\\"
fi
done
IFS=' '
completion+="\n )"
completion+="\n ;;"
done <<< "$(jq -r '"\(.topic) \(.command)"' commands-display.json)"
completion+="\n esac"
completion+="\n"
completion+="\n_arguments \\\\"
completion+="\n \$_command_args \\\\"
completion+="\n && return 0"
echo $completion > _sfdx