Closed (fixed)
Project:
Drush
Component:
PM (dl, en, up ...)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2010 at 10:50 UTC
Updated:
18 Jan 2011 at 03:00 UTC
Jump to comment: Most recent file
It would be cool if there would be a way to define drush_prompt to be optional,
so if the user does not input anything just a "" drush continues and not ask again
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | drush-prompt-required.patch | 1.06 KB | greg.1.anderson |
| #6 | drush-prompt-doc.patch | 1.04 KB | dawehner |
| #2 | 838684-drush_prompt-optional.patch | 831 bytes | dawehner |
| #1 | 838684-drush_prompt-optional.patch | 1.88 KB | dawehner |
Comments
Comment #1
dawehnerHere is a patch for it.
Comment #2
dawehnerwrong patch
Comment #3
moshe weitzman commentedI'd love some input from anyone who actually uses this function?
Comment #4
dawehnerI used this patch when i developed http://drupal.org/node/838660#comment-3136766
Perhaps joachim could take a look
Comment #5
greg.1.anderson commentedLooks like moshe already committed this... Code looks fine to me. On a semantic level, maybe $optional could be '$blank_input_allowed'? Could use some javadocs.
Comment #6
dawehnerThanks for commiting the patch.
Here is a patch for the docs
Comment #7
moshe weitzman commentedtweaked and committed.
Comment #9
joachim commentedAny chance this could be applied to 3 too?
Comment #10
moshe weitzman commentedsorry, only bug fixes for 3.
Comment #11
joachim commentedHaving code that actually implements this makes me realize -- having an $optional parameter is backwards. On Drupal, we say 'required' = TRUE.
Comment #12
greg.1.anderson commentedThat would break all callers who use drush_prompt w/out the default value for that parameter. In drush core, there is only one caller, and it does not specify the last parameter, so this would only break contrib.
There's about one more day, maybe close to two for this to get committed before drush-4 is released; after that, you'll have to wait for drush-5. I'm game, though. Any dissenting opinions?
Comment #13
moshe weitzman commentedok with me
Comment #14
greg.1.anderson commentedIn it goes, just in time... no need to wait another six months. :)