 #   ## Scheduling
 #
 #   hubot pager schedules - list schedules
+#   hubot pager schedules <search> - list schedules matching <search>
 #   hubot pager schedule <schedule> - show <schedule>'s shifts for the upcoming month
 #   hubot pager me <schedule> 60 - take the pager for 60 minutes
 #   hubot pager override <schedule> <start> - <end> [username] - Create an schedule override from <start> until <end>. If [username] is left off, defaults to you. start and end should date-parsable dates, like 2014-06-24T09:06:45-07:00, see http://momentjs.com/docs/#/parsing/string/ for examples.

            value = false
        cb value

  withCurrentOncall = (msg, cb) ->
    oneHour = moment().add('hours', 1).format()
    now = moment().format()


        else
          msg.send "Sorry, I couldn't do it :("

  robot.respond /(pager|major)( me)? schedules( (.+))?$/i, (msg) ->
    query = {}
    if msg.match[4]
      query['query'] = msg.match[4]
    pagerDutyGet msg, "/schedules", query, (json) ->
      buffer = ''
      schedules = json.schedules
      if schedules
