Problem/Motivation
The current Drush command aliases in the Acquia DAM module are inconsistent and difficult to use:
- Inconsistent naming patterns: Some aliases use hyphens (ad-qia), others are concatenated (adqua, adqil), and one has no prefix at all (das)
- Poor discoverability: Concatenated aliases like adqil, adpuq, and adramt are hard to read and don't clearly indicate they belong to Acquia DAM
- No namespace preservation: The das alias for download-assets completely loses the Acquia DAM context
- Not intuitive: Users cannot easily guess or remember the relationship between full commands and their aliases
Current aliases:
AssetImportDrushCommands (submodule)
- acquia-dam:queue-import-assets → ad-qia (has prefix, uses hyphen)
- acquia-dam:process-import-queue → ad-piq (has prefix, uses hyphen)
- acquia-dam:import-assets → ad-ia (has prefix, uses hyphen)
DownloadAssetsDrushCommands
- acquia-dam:download-assets → das (no prefix!)
AssetUpdateDrushCommands
- acquia-dam:queue-update-assets → adqua (concatenated, hard to parse)
- acquia-dam:process-update-queue → adpuq (concatenated, hard to parse)
- acquia-dam:update-assets → adua (concatenated, hard to parse)
- acquia-dam:resolve-asset-media-type → adramt (concatenated, hard to parse)
IntegrationLinksDrushCommands
- acquia-dam:queue-integration-links → adqil (concatenated, hard to parse)
- acquia-dam:process-integration-links-queue → adpilq (concatenated, hard to parse)
- acquia-dam:register-integration-links → adril (concatenated, hard to parse)
This inconsistency makes it difficult for users to:
- Discover available commands using tab completion
- Remember which alias corresponds to which command
- Identify that commands belong to the Acquia DAM module
Proposed resolution
Standardize all Drush command aliases to use the ad: pattern with colon separators:
Benefits:
- Consistency: All aliases follow the same pattern
- Readability: Colons provide visual separation making aliases easier to parse
- Discoverability: Users can type drush ad: to see all Acquia DAM commands
- Namespace preservation: The ad: prefix clearly indicates "Acquia DAM"
- Follows best practices: Mirrors the structure of core Drush commands (e.g., config:export → cex, cache:rebuild → cr)
Proposed new aliases (with backward compatibility):
| Command | Current Alias | New Alias |
|---|---|---|
| acquia-dam:queue-import-assets | ad-qia | ad:qia |
| acquia-dam:process-import-queue | ad-piq | ad:piq |
| acquia-dam:import-assets | ad-ia | ad:ia |
| acquia-dam:download-assets | das | ad:das |
| acquia-dam:queue-update-assets | adqua | ad:qua |
| acquia-dam:process-update-queue | adpuq | ad:puq |
| acquia-dam:update-assets | adua | ad:ua |
| acquia-dam:resolve-asset-media-type | adramt | ad:ramt |
| acquia-dam:queue-integration-links | adqil | ad:qil |
| acquia-dam:process-integration-links-queue | adpilq | ad:pilq |
| acquia-dam:register-integration-links | adril | ad:ril |
Implementation approach:
- Add new
ad:*aliases as the primary aliases in all Drush command files - Keep existing aliases for backward compatibility (to be deprecated in a future major version)
- Update documentation to reference the new alias pattern
Files to modify:
- modules/acquiadam_asset_import/src/Drush/Commands/AssetImportDrushCommands.php
- src/Drush/Commands/AssetUpdateDrushCommands.php
- src/Drush/Commands/DownloadAssetsDrushCommands.php
- src/Drush/Commands/IntegrationLinksDrushCommands.php
Example change for one command:
// Before
#[CLI\Command(name: 'acquia-dam:download-assets', aliases: ['das'])]
// After
#[CLI\Command(name: 'acquia-dam:download-assets', aliases: ['ad:das', 'das'])]
Issue fork acquia_dam-3609001
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rajeshreeputraRequesting review.
Comment #5
rajeshreeputraMR merged!