Fix sf-org-info two-character options: standardize to -lm/-ls, update docs and tests
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
.PARAMETER to
|
||||
Target org username or alias (uses default if not specified)
|
||||
|
||||
.PARAMETER limits
|
||||
.PARAMETER lm
|
||||
Show detailed org limits information
|
||||
|
||||
.PARAMETER list
|
||||
.PARAMETER ls
|
||||
List all authenticated orgs
|
||||
|
||||
.PARAMETER ve
|
||||
@@ -26,9 +26,9 @@
|
||||
|
||||
.EXAMPLE
|
||||
.\sf-org-info.ps1
|
||||
.\sf-org-info.ps1 -to "myorg" -limits -ve
|
||||
.\sf-org-info.ps1 -limits
|
||||
.\sf-org-info.ps1 -list
|
||||
.\sf-org-info.ps1 -to "myorg" -lm -ve
|
||||
.\sf-org-info.ps1 -lm
|
||||
.\sf-org-info.ps1 -ls
|
||||
|
||||
.NOTES
|
||||
This script automatically checks for Salesforce CLI installation and runs
|
||||
@@ -37,14 +37,14 @@
|
||||
|
||||
param(
|
||||
[string]$to,
|
||||
[switch]$limits,
|
||||
[switch]$list,
|
||||
[switch]$lm,
|
||||
[switch]$ls,
|
||||
[switch]$ve,
|
||||
[switch]$hp
|
||||
)
|
||||
|
||||
# Show help if requested or if no parameters provided
|
||||
if ($hp -or (-not $to -and -not $limits -and -not $list -and -not $ve)) {
|
||||
if ($hp -or (-not $to -and -not $lm -and -not $ls -and -not $ve)) {
|
||||
Get-Help $MyInvocation.MyCommand.Path -Detailed
|
||||
exit 0
|
||||
}
|
||||
@@ -123,7 +123,7 @@ if (-not (Test-SalesforceCLI)) {
|
||||
}
|
||||
|
||||
# If list is specified, show all authenticated orgs and exit
|
||||
if ($list) {
|
||||
if ($ls) {
|
||||
Write-SectionHeader "Authenticated Orgs"
|
||||
$success = Invoke-SafeSfCommand @("org", "list")
|
||||
|
||||
@@ -158,7 +158,7 @@ if (-not $success) {
|
||||
}
|
||||
|
||||
# If limits are requested, show org limits
|
||||
if ($limits) {
|
||||
if ($lm) {
|
||||
Write-SectionHeader "Organization Limits"
|
||||
|
||||
# Build limits command
|
||||
@@ -204,7 +204,7 @@ if ($ve) {
|
||||
Write-Host ""
|
||||
Write-Host "✅ Organization information retrieved successfully!" -ForegroundColor Green
|
||||
|
||||
if (-not $limits -and -not $ve) {
|
||||
if (-not $lm -and -not $ve) {
|
||||
Write-Host ""
|
||||
Write-Host "💡 Tip: Use -limits to see org limits, -ve for more details, or -list to see all authenticated orgs" -ForegroundColor Yellow
|
||||
Write-Host "💡 Tip: Use -lm to see org limits, -ve for more details, or -ls to see all authenticated orgs" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user