Needs review
Project:
Configuration Management
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Sep 2015 at 13:54 UTC
Updated:
3 Sep 2015 at 14:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rijidij commentedRijidij created an issue.
Here is a patch that adds the --id option to config-get-tracked (cgt) and config-get-non-tracked (cgnt) drush commands.
This option will print the component identifier in the first column of the command output.
You can cut and paste, or pipe the identifier to other commands.
Here is an example of cgnt (with the --id option) piped through grep and awk to print a nice list of component IDs, separated by spaces.
drush cgnt --id | grep --color=none "field_something" | awk '{printf "\47%s\47 ", $1}'Note the use of the "--color=none" option on the grep command. This is to avoid inclusion of shell colour code characters in the output.
The "\47" escape sequence wraps each ID in single quotes to escape them from the shell (in case they contain pipe characters, etc.).
When you're happy with the component list, you can then pipe the whole thing into the csta command, like this:
drush cgnt --id | grep --color=none "field_something" | awk '{printf "\47%s\47 ", $1}' | xargs drush csta --exclude-dependencies --exclude-optionalsI hope you all find this useful.
Comment #2
rijidij commentedTried to add patch file to previous comment...
Comment #3
rijidij commentedComment #4
rijidij commented