Example #1
0
 def init_prefilters(self):
     """ this initializes prefilters which are central
         to smash's ability to parse python-looking input
         which is actually intended to be shell input.
         out-of-box, ipython cannot parse bash commands
         with dashes like "apt-get install foo", because "apt-get"
         is subtraction among (probably undefined) variables "apt"
         and "get".
     """
     checker, handler = register_prefilter(ShellChecker, ShellHandler)
     return checker, handler
 def install(self):
     register_prefilter(URLChecker, URLHandler)
     return self