Implement innovative two-character option scheme
- Replace single-character options with memorable two-character alternatives - Based on syllable mapping: -to (target-org), -qy (query), -fm (format), etc. - Updated all bash and PowerShell scripts with consistent options - Added comprehensive documentation and examples to README.md - Maintains backward compatibility with long options - More intuitive and self-documenting than traditional CLI options
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
.PARAMETER Code
|
||||
Inline Apex code to execute (alternative to -File)
|
||||
|
||||
.PARAMETER TargetOrg
|
||||
.PARAMETER o
|
||||
Target org username or alias (uses default if not specified)
|
||||
|
||||
.PARAMETER Verbose
|
||||
@@ -27,7 +27,7 @@
|
||||
.EXAMPLE
|
||||
.\sf-apex-run.ps1 -File "scripts/setup.apex"
|
||||
.\sf-apex-run.ps1 -Code "System.debug('Hello World');"
|
||||
.\sf-apex-run.ps1 -File "test.apex" -TargetOrg "sandbox"
|
||||
.\sf-apex-run.ps1 -File "test.apex" -o "sandbox"
|
||||
.\sf-apex-run.ps1 -Code "Database.insert(new Account(Name='Test'));" -Verbose
|
||||
|
||||
.NOTES
|
||||
@@ -42,7 +42,7 @@ param(
|
||||
[Parameter(ParameterSetName="Code")]
|
||||
[string]$Code,
|
||||
|
||||
[string]$TargetOrg,
|
||||
[string]$o,
|
||||
[switch]$Verbose,
|
||||
[switch]$Help
|
||||
)
|
||||
@@ -158,10 +158,10 @@ if ($File) {
|
||||
$sfArgs = @("apex", "run")
|
||||
|
||||
# Add target org if specified
|
||||
if ($TargetOrg) {
|
||||
if ($o) {
|
||||
$sfArgs += "--target-org"
|
||||
$sfArgs += $TargetOrg
|
||||
Write-Host "Target org: $TargetOrg" -ForegroundColor Cyan
|
||||
$sfArgs += $o
|
||||
Write-Host "Target org: $o" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
# Add verbose flag if requested
|
||||
|
||||
Reference in New Issue
Block a user