Remove all long options (--) for complete consistency
✅ Major Consistency Update: - Removed ALL long options (--target-org, --help, etc.) from scripts - Now using ONLY two-character options (-to, -hp, etc.) - Complete consistency across all wrapper scripts Updated Scripts: ✅ sf-deploy: Removed --target-org, --sources, --directory, --tests, --help ✅ sf-dry-run: Removed all --long options, matching sf-deploy ✅ sf-web-open: Removed --target-org, --path, --url-only, --help ✅ sf-data-export: Removed all --long options throughout ✅ sf-logs-tail: Removed all --long options and updated help text Updated Test Scripts: ✅ test-wrapper-suite.sh: Removed --help tests and --long option tests ✅ quick-test.sh: Updated to use -ls instead of --list ✅ All tests now use only two-character options 🎯 Result: Pure two-character option interface - Clean, consistent UX: -to, -sr, -dr, -ts, -hp, -qy, -fl, etc. - No mixing of single-char, two-char, and long options - Memorable, self-documenting option names throughout
This commit is contained in:
@@ -85,7 +85,7 @@ fi
|
|||||||
# Test sf-org-info
|
# Test sf-org-info
|
||||||
echo -n "Testing sf-org-info... "
|
echo -n "Testing sf-org-info... "
|
||||||
((TESTS++))
|
((TESTS++))
|
||||||
if ./sf-org-info --list >/dev/null 2>&1; then
|
if ./sf-org-info -ls >/dev/null 2>&1; then
|
||||||
echo -e "${GREEN}✓${NC}"
|
echo -e "${GREEN}✓${NC}"
|
||||||
((PASSED++))
|
((PASSED++))
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ show_usage() {
|
|||||||
echo " sf-data-export [OPTIONS]"
|
echo " sf-data-export [OPTIONS]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "OPTIONS:"
|
echo "OPTIONS:"
|
||||||
echo " -qy, --query QUERY SOQL query to export data"
|
echo " -qy SOQL query to export data"
|
||||||
echo " -fl, --file FILE File containing SOQL query"
|
echo " -fl File containing SOQL query"
|
||||||
echo " -so, --sobject SOBJECT Standard object query (exports all records)"
|
echo " -so Standard object query (exports all records)"
|
||||||
echo " -to, --target-org ORG Target org username or alias"
|
echo " -to Target org username or alias"
|
||||||
echo " -ot, --output FILE Output file path (default: export.csv)"
|
echo " -ot Output file path (default: export.csv)"
|
||||||
echo " -fm, --format FORMAT Output format: csv, json (default: csv)"
|
echo " -fm Output format: csv, json (default: csv)"
|
||||||
echo " -bk, --bulk Use bulk API for large datasets"
|
echo " -bk Use bulk API for large datasets"
|
||||||
echo " -wt, --wait MINUTES Wait time in minutes (default: 10)"
|
echo " -wt Wait time in minutes (default: 10)"
|
||||||
echo " -vb, --verbose Enable verbose output"
|
echo " -vb Enable verbose output"
|
||||||
echo " -hp, --help Show this help message"
|
echo " -hp Show this help message"
|
||||||
echo ""
|
echo ""
|
||||||
echo "EXAMPLES:"
|
echo "EXAMPLES:"
|
||||||
echo " sf-data-export -qy \"SELECT Id, Name FROM Account LIMIT 100\""
|
echo " sf-data-export -qy \"SELECT Id, Name FROM Account LIMIT 100\""
|
||||||
@@ -123,43 +123,43 @@ VERBOSE=false
|
|||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-qy|--query)
|
-qy)
|
||||||
QUERY="$2"
|
QUERY="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-fl|--file)
|
-fl)
|
||||||
QUERY_FILE="$2"
|
QUERY_FILE="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-so|--sobject)
|
-so)
|
||||||
SOBJECT="$2"
|
SOBJECT="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-to|--target-org)
|
-to)
|
||||||
TARGET_ORG="$2"
|
TARGET_ORG="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-ot|--output)
|
-ot)
|
||||||
OUTPUT_FILE="$2"
|
OUTPUT_FILE="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-fm|--format)
|
-fm)
|
||||||
FORMAT="$2"
|
FORMAT="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-bk|--bulk)
|
-bk)
|
||||||
USE_BULK=true
|
USE_BULK=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-wt|--wait)
|
-wt)
|
||||||
WAIT_TIME="$2"
|
WAIT_TIME="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-vb|--verbose)
|
-vb)
|
||||||
VERBOSE=true
|
VERBOSE=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-hp|--help)
|
-hp)
|
||||||
show_usage
|
show_usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
@@ -188,16 +188,16 @@ if [[ $query_methods -eq 0 ]]; then
|
|||||||
echo -e "${RED}Error: Must specify one of: --query, --file, or --sobject${NC}"
|
echo -e "${RED}Error: Must specify one of: --query, --file, or --sobject${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${YELLOW}Usage examples:${NC}"
|
echo -e "${YELLOW}Usage examples:${NC}"
|
||||||
echo -e "${GRAY} sf-data-export --query \"SELECT Id, Name FROM Account\"${NC}"
|
echo -e "${GRAY} sf-data-export -qy \"SELECT Id, Name FROM Account\"${NC}"
|
||||||
echo -e "${GRAY} sf-data-export --file queries/accounts.soql${NC}"
|
echo -e "${GRAY} sf-data-export -fl queries/accounts.soql${NC}"
|
||||||
echo -e "${GRAY} sf-data-export --sobject Account${NC}"
|
echo -e "${GRAY} sf-data-export -so Account${NC}"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${YELLOW}Use --help for detailed usage information.${NC}"
|
echo -e "${YELLOW}Use --help for detailed usage information.${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $query_methods -gt 1 ]]; then
|
if [[ $query_methods -gt 1 ]]; then
|
||||||
echo -e "${RED}Error: Can only specify one of: --query, --file, or --sobject${NC}"
|
echo -e "${RED}Error: Can only specify one of: -qy, -fl, or -so${NC}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
20
sf-deploy
20
sf-deploy
@@ -9,11 +9,11 @@ USAGE:
|
|||||||
sf-deploy -to <ORG_ALIAS_OR_USERNAME> (-sr "<src1>,<src2>[,...]" | -dr <DIRECTORY>) [-ts "<Test1>,<Test2>[,...]"]
|
sf-deploy -to <ORG_ALIAS_OR_USERNAME> (-sr "<src1>,<src2>[,...]" | -dr <DIRECTORY>) [-ts "<Test1>,<Test2>[,...]"]
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
-to, --target-org Org alias or username for --target-org
|
-to Org alias or username for --target-org
|
||||||
-sr, --sources Comma-separated list of --source-dir paths
|
-sr Comma-separated list of --source-dir paths
|
||||||
-dr, --directory Single directory path to deploy (alternative to -sr)
|
-dr Single directory path to deploy (alternative to -sr)
|
||||||
-ts, --tests Comma-separated list of --tests (enables --test-level RunSpecifiedTests)
|
-ts Comma-separated list of --tests (enables --test-level RunSpecifiedTests)
|
||||||
-hp, --help Show this help
|
-hp Show this help
|
||||||
|
|
||||||
EXAMPLES:
|
EXAMPLES:
|
||||||
1) Real deploy with multiple flexipages (specific files):
|
1) Real deploy with multiple flexipages (specific files):
|
||||||
@@ -48,23 +48,23 @@ fi
|
|||||||
# Parse command line arguments using manual parsing for two-character options
|
# Parse command line arguments using manual parsing for two-character options
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-to|--target-org)
|
-to)
|
||||||
ORG="$2"
|
ORG="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-sr|--sources)
|
-sr)
|
||||||
IFS=',' read -r -a SOURCES_ARR <<< "$2"
|
IFS=',' read -r -a SOURCES_ARR <<< "$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-dr|--directory)
|
-dr)
|
||||||
DIR_PATH="$2"
|
DIR_PATH="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-ts|--tests)
|
-ts)
|
||||||
IFS=',' read -r -a TESTS_ARR <<< "$2"
|
IFS=',' read -r -a TESTS_ARR <<< "$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-hp|--help)
|
-hp)
|
||||||
show_help
|
show_help
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|||||||
20
sf-dry-run
20
sf-dry-run
@@ -9,11 +9,11 @@ USAGE:
|
|||||||
sf-dry-run -to <ORG_ALIAS_OR_USERNAME> (-sr "<src1>,<src2>[,...]" | -dr <DIRECTORY>) [-ts "<Test1>,<Test2>[,...]"]
|
sf-dry-run -to <ORG_ALIAS_OR_USERNAME> (-sr "<src1>,<src2>[,...]" | -dr <DIRECTORY>) [-ts "<Test1>,<Test2>[,...]"]
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
-to, --target-org Org alias or username for --target-org
|
-to Org alias or username for --target-org
|
||||||
-sr, --sources Comma-separated list of --source-dir paths
|
-sr Comma-separated list of --source-dir paths
|
||||||
-dr, --directory Single directory path to validate (alternative to -sr)
|
-dr Single directory path to validate (alternative to -sr)
|
||||||
-ts, --tests Comma-separated list of --tests (enables --test-level RunSpecifiedTests)
|
-ts Comma-separated list of --tests (enables --test-level RunSpecifiedTests)
|
||||||
-hp, --help Show this help
|
-hp Show this help
|
||||||
|
|
||||||
EXAMPLES:
|
EXAMPLES:
|
||||||
1) Basic dry-run with multiple flexipages (specific files):
|
1) Basic dry-run with multiple flexipages (specific files):
|
||||||
@@ -48,23 +48,23 @@ fi
|
|||||||
# Parse command line arguments using manual parsing for two-character options
|
# Parse command line arguments using manual parsing for two-character options
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-to|--target-org)
|
-to)
|
||||||
ORG="$2"
|
ORG="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-sr|--sources)
|
-sr)
|
||||||
IFS=',' read -r -a SOURCES_ARR <<< "$2"
|
IFS=',' read -r -a SOURCES_ARR <<< "$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-dr|--directory)
|
-dr)
|
||||||
DIR_PATH="$2"
|
DIR_PATH="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-ts|--tests)
|
-ts)
|
||||||
IFS=',' read -r -a TESTS_ARR <<< "$2"
|
IFS=',' read -r -a TESTS_ARR <<< "$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-hp|--help)
|
-hp)
|
||||||
show_help
|
show_help
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|||||||
36
sf-logs-tail
36
sf-logs-tail
@@ -21,15 +21,15 @@ show_usage() {
|
|||||||
echo " sf-logs-tail [OPTIONS]"
|
echo " sf-logs-tail [OPTIONS]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "OPTIONS:"
|
echo "OPTIONS:"
|
||||||
echo " -to, --target-org ORG Target org username or alias"
|
echo " -to Target org username or alias"
|
||||||
echo " -ui, --user-id USER Specific user ID to monitor (default: current user)"
|
echo " -ui Specific user ID to monitor (default: current user)"
|
||||||
echo " -lv, --level LEVEL Log level: ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST"
|
echo " -lv Log level: ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST"
|
||||||
echo " -dr, --duration MINUTES How long to tail logs in minutes (default: 30)"
|
echo " -dr How long to tail logs in minutes (default: 30)"
|
||||||
echo " -ft, --filter PATTERN Filter log entries containing pattern"
|
echo " -ft Filter log entries containing pattern"
|
||||||
echo " -ax, --apex-only Show only Apex-related log entries"
|
echo " -ax Show only Apex-related log entries"
|
||||||
echo " -nc, --no-colors Disable colored output"
|
echo " -nc Disable colored output"
|
||||||
echo " -vb, --verbose Enable verbose output with timestamps"
|
echo " -vb Enable verbose output with timestamps"
|
||||||
echo " -hp, --help Show this help message"
|
echo " -hp Show this help message"
|
||||||
echo ""
|
echo ""
|
||||||
echo "EXAMPLES:"
|
echo "EXAMPLES:"
|
||||||
echo " sf-logs-tail # Tail logs for default org"
|
echo " sf-logs-tail # Tail logs for default org"
|
||||||
@@ -153,39 +153,39 @@ VERBOSE=false
|
|||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-to|--target-org)
|
-to)
|
||||||
TARGET_ORG="$2"
|
TARGET_ORG="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-ui|--user-id)
|
-ui)
|
||||||
USER_ID="$2"
|
USER_ID="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-lv|--level)
|
-lv)
|
||||||
LOG_LEVEL="$2"
|
LOG_LEVEL="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-dr|--duration)
|
-dr)
|
||||||
DURATION="$2"
|
DURATION="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-ft|--filter)
|
-ft)
|
||||||
FILTER_PATTERN="$2"
|
FILTER_PATTERN="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-ax|--apex-only)
|
-ax)
|
||||||
APEX_ONLY=true
|
APEX_ONLY=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-nc|--no-colors)
|
-nc)
|
||||||
NO_COLORS=true
|
NO_COLORS=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-vb|--verbose)
|
-vb)
|
||||||
VERBOSE=true
|
VERBOSE=true
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-hp|--help)
|
-hp)
|
||||||
show_usage
|
show_usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|||||||
16
sf-web-open
16
sf-web-open
@@ -9,10 +9,10 @@ USAGE:
|
|||||||
sf-web-open [-to <ORG_ALIAS_OR_USERNAME>] [-pt <RELATIVE_PATH>] [-ur]
|
sf-web-open [-to <ORG_ALIAS_OR_USERNAME>] [-pt <RELATIVE_PATH>] [-ur]
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
-to, --target-org Org alias or username to pass as --target-org
|
-to Org alias or username to pass as --target-org
|
||||||
-pt, --path Relative path to open inside the org (e.g., "/lightning/setup/SetupOneHome/home")
|
-pt Relative path to open inside the org (e.g., "/lightning/setup/SetupOneHome/home")
|
||||||
-ur, --url-only URL-only: print the URL instead of opening a browser (passes --url-only)
|
-ur URL-only: print the URL instead of opening a browser (passes --url-only)
|
||||||
-hp, --help Show this help
|
-hp Show this help
|
||||||
|
|
||||||
EXAMPLES:
|
EXAMPLES:
|
||||||
1) Open a specific org (default home):
|
1) Open a specific org (default home):
|
||||||
@@ -42,19 +42,19 @@ fi
|
|||||||
# Parse command line arguments using manual parsing for two-character options
|
# Parse command line arguments using manual parsing for two-character options
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-to|--target-org)
|
-to)
|
||||||
ORG="$2"
|
ORG="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-pt|--path)
|
-pt)
|
||||||
PATH_ARG="$2"
|
PATH_ARG="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-ur|--url-only)
|
-ur)
|
||||||
URL_ONLY=1
|
URL_ONLY=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-hp|--help)
|
-hp)
|
||||||
show_help
|
show_help
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user