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:
reynold
2025-08-28 18:51:13 +08:00
parent 4e5d82eee3
commit 43fc686e26
6 changed files with 71 additions and 71 deletions

View File

@@ -20,16 +20,16 @@ show_usage() {
echo " sf-data-export [OPTIONS]"
echo ""
echo "OPTIONS:"
echo " -qy, --query QUERY SOQL query to export data"
echo " -fl, --file FILE File containing SOQL query"
echo " -so, --sobject SOBJECT Standard object query (exports all records)"
echo " -to, --target-org ORG Target org username or alias"
echo " -ot, --output FILE Output file path (default: export.csv)"
echo " -fm, --format FORMAT Output format: csv, json (default: csv)"
echo " -bk, --bulk Use bulk API for large datasets"
echo " -wt, --wait MINUTES Wait time in minutes (default: 10)"
echo " -vb, --verbose Enable verbose output"
echo " -hp, --help Show this help message"
echo " -qy SOQL query to export data"
echo " -fl File containing SOQL query"
echo " -so Standard object query (exports all records)"
echo " -to Target org username or alias"
echo " -ot Output file path (default: export.csv)"
echo " -fm Output format: csv, json (default: csv)"
echo " -bk Use bulk API for large datasets"
echo " -wt Wait time in minutes (default: 10)"
echo " -vb Enable verbose output"
echo " -hp Show this help message"
echo ""
echo "EXAMPLES:"
echo " sf-data-export -qy \"SELECT Id, Name FROM Account LIMIT 100\""
@@ -123,43 +123,43 @@ VERBOSE=false
# Parse command line arguments
while [[ $# -gt 0 ]]; do
case $1 in
-qy|--query)
-qy)
QUERY="$2"
shift 2
;;
-fl|--file)
-fl)
QUERY_FILE="$2"
shift 2
;;
-so|--sobject)
-so)
SOBJECT="$2"
shift 2
;;
-to|--target-org)
-to)
TARGET_ORG="$2"
shift 2
;;
-ot|--output)
-ot)
OUTPUT_FILE="$2"
shift 2
;;
-fm|--format)
-fm)
FORMAT="$2"
shift 2
;;
-bk|--bulk)
-bk)
USE_BULK=true
shift
;;
-wt|--wait)
-wt)
WAIT_TIME="$2"
shift 2
;;
-vb|--verbose)
-vb)
VERBOSE=true
shift
;;
-hp|--help)
-hp)
show_usage
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 ""
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 --file queries/accounts.soql${NC}"
echo -e "${GRAY} sf-data-export --sobject Account${NC}"
echo -e "${GRAY} sf-data-export -qy \"SELECT Id, Name FROM Account\"${NC}"
echo -e "${GRAY} sf-data-export -fl queries/accounts.soql${NC}"
echo -e "${GRAY} sf-data-export -so Account${NC}"
echo ""
echo -e "${YELLOW}Use --help for detailed usage information.${NC}"
exit 1
fi
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
fi