Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Looking at the vget code, the help text is inaccurate. It now uses a regex that will match any part of the variable name.
Comment | File | Size | Author |
---|---|---|---|
#10 | 1673006-10-exact-synonym.patch | 2.62 KB | damiankloip |
#10 | 1673006-10-remove-always-set.patch | 2.5 KB | damiankloip |
#7 | 1673006-7.patch | 1.65 KB | damiankloip |
#4 | 1673006-4.patch | 1.2 KB | damiankloip |
#1 | 1673006-1.patch | 928 bytes | pwolanin |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedComment #2
koglinjg CreditAttribution: koglinjg commentedI noticed this discrepancy today and would like to be able to look for strictly what I am asking for. Can we add a "--strict" option to only take exact matches. Right now I have to do a secondary grep to remove extraneous results of other items that contain my search term in addition to some other prefix or suffix.
I will submit a patch in the next few days when I add it for myself, but if anyone else wants to beat me to it ... ;p
Comment #3
pwolanin CreditAttribution: pwolanin commentedvdel takes an --exact option so maybe copy that for vget too?
Comment #4
damiankloip CreditAttribution: damiankloip commentedI think the --exact option is a good idea. Here is a patch that implements that. It might be worth thinking about having additional args taken if exact is used too?
Comment #5
koglinjg CreditAttribution: koglinjg commentedThanks, damiankloip that patch looks great. Applied cleanly against 7.x-5.4 and works like a charm.
Comment #6
damiankloip CreditAttribution: damiankloip commented@koglinjg, good to hear! :)
Although maybe I should roll pwolanins changes to the help text in there too.
Comment #7
damiankloip CreditAttribution: damiankloip commentedComment #8
moshe weitzman CreditAttribution: moshe weitzman commentedSeems ok to me. Any objections?
Comment #9
greg.1.anderson CreditAttribution: greg.1.anderson commentedDidn't test, but seems okay. Maybe vset should accept --exact (as a synonym for --always-set) for consistency? Maybe remove --always-set in Drush-6?
Comment #10
damiankloip CreditAttribution: damiankloip commentedHere is a path that both adds the synonym and removes the always set method. You guys can choose then :)
Comment #11
moshe weitzman CreditAttribution: moshe weitzman commentedI'll let greg review and commit this. I have no preference.
Comment #12
greg.1.anderson CreditAttribution: greg.1.anderson commentedCommitted the first option for backwards-compatibility with existing Drush-5.x behavior, but hid --always-set in the help text to encourage folks to migrate to --exact. Also added a test for --exact.