 
   switch action
     when 'list'
-      if argv.update
-        cmd = [ensureCacheDir, fetchListing, displayListing, writeListing]
-      else
-        cmd = [ensureCacheDir, loadListing, displayListing, updateIfNeeded]
+      cmd = [fetchListing, displayListing]
     when 'install'
-      cmd = [[loadCurrentEnv, loadListing], installPlugin]
+      cmd = [[loadCurrentEnv, fetchListing], installPlugin]
 
     else
       cmd = [(callback) -> callback new Error "Unknown plugin action: #{ action }"]

    else
      process.exit 0

if require.main is module
  logLevel = process.argv[2] or 'info'
  logger.transports.cli.level = logLevel
  async.waterfall [ensureCacheDir, fetchListing, writeListing], (error) ->
    if error?
      logger.error error.message, error
      process.exit 1
    else
      logger.verbose 'plugin listing updated'

module.exports = main
module.exports.usage = usage

    if left > plugin.maintainers.length
      line += chalk.grey lpad(plugin.maintainers, left)
    logger.info line.replace /^\s*(\S+)  /, (m) -> chalk.bold m
    if plugin.homepage? and plugin.homepage.length < maxw - pad - 2
      logger.info "#{ margin }  #{ chalk.gray plugin.homepage }"
    logger.info ''

  callback null, list

waterfall = (flow, callback) ->
  ### async.waterfall that allows for parallel tasks ###
