                defaultValue : no
                cssClass     : 'tiny switch'
             warningView     :
-              itemClass     : KDView
+              itemClass     : kd.View
               cssClass      : 'hidden notification'
 
     super options, data

    view.show()
    @searchButton.hideLoader()

  viewAppended: ->
    super

    @addSubView new KDCustomHTMLView cssClass: 'icon'

    searchForm      = @modalTabs.forms.Search
    {@warningView}  = searchForm.fields
    {@searchButton} = searchForm.buttons
    {@findInput,  @whereInput} = searchForm.inputs
    {@caseToggle, @regExpToggle, @wholeWordToggle} = searchForm.inputs

    @findInput.setFocus()

        @showWarning 'Something went wrong, please try again.'
        kd.warn err


  escapeRegExp: (str) -> str.replace /([.*+?\^${}()|\[\]\/\\])/g, '\\$1'

  escapeShell: (str) -> str.replace /([\\"'`$\s\(\)<>])/g, '\\$1'

  grepEscapeRegExp: (str) -> str.replace /[[\]{}()*+?.,\\^$|#\s"']/g, '\\$&'


  formatOutput: (machine, output, callback = kd.noop) ->

    return @showWarning 'Something went wrong, please try again.', yes  if output.stderr

    @machine = machine
