List Drush specific add ons, plug ins, extensions, or modules to use drush dl in automated script I'm writing a really basic bash script and want use drush dl to download the Drush extras add on. 

drush dl drush_extras

But I need to check whether drush extras is installed before I try to install it (and then use it) because it prompts the following text. 


  Install location C:\cygwin64\home\USER/.drush/drush_extras already exists. Do you want to overwrite it? (y/n):


How do I determine whether a drush add on/plug in/module (not sure what you call it) exists? So I handle that use case?

I'm trying to automate configuration, starting with assigning blocks to regions, and I have to make it work on Windows (first) and Linux. So I'm using Cygwin and Drush on Windows. There's probably different approaches, but this seems OK.
I would personally lean towards simply installing with -y. Adding -y onto the command you've listed will return Y accepting the default on any prompt that comes up (like the one you mention).

drush dl drush_extras -y

If you still want to check if it’s installed, you can check if the directory exists,

if [ -e $HOME/.drush/drush_extras ]; then
  # some logic here
fi 


This won’t help you if the directory is empty though.

Another option is checking the output of 

drush someCommand -h


Where someCommand is a command provided by drush_extras. You can compare the output of a valid one to an invalid one. If they match, it’s not installed.