def block_command(self): if "basement" in self.last_user_input and \ ( "ls" in self.last_user_input or "cat" in self.last_user_input ): print bernard_text return True else: return TerminalMkdirEleanor.block_command(self)
def block_command(self): if "seminterrato" in self.last_user_input and \ ( "ls" in self.last_user_input or "cat" in self.last_user_input ): print bernard_text return True else: return TerminalMkdirEleanor.block_command(self)
def autocomplete_files(self, text, line, begidx, endidx, only_dirs=False, only_exe=False): # if the path we're checking is in Bernard's basement, we should # return the same text: # Bernard stopped you going in the basement. completions = TerminalMkdirEleanor.autocomplete_files( self, text, line, begidx, endidx, only_dirs, only_exe ) if "fotocopiatrice.sh" in completions: print "\n" + bernard_text return [] else: return completions
def autocomplete_files(self, text, line, begidx, endidx, only_dirs=False, only_exe=False): # if the path we're checking is in Bernard's basement, we should # return the same text: # Bernard stopped you going in the basement. completions = TerminalMkdirEleanor.autocomplete_files( self, text, line, begidx, endidx, only_dirs, only_exe ) if "photocopier.sh" in completions: print "\n" + bernard_text return [] else: return completions