Beispiel #1
0
    def completenames(self, text, *ignored):
        '''Override completenames so we can support names which have a dash
        in them.

        '''
        real_names = Cmd.completenames(self, text.replace('-', '_'), *ignored)
        return [string.replace('_', '-') for string in real_names]
Beispiel #2
0
 def completenames(self, text, *ignored):
     channel = self._robot.channels.get(self._robot._channel, None)
     if channel:
         users = [pseudo for pseudo in self._robot.channels.get(self._robot._channel, []) if pseudo.startswith(text)]
     else:
         users = []
     return Cmd.completenames(self, text, *ignored) + users
Beispiel #3
0
  def completenames(self, text, line, begidx, endidex):
    r = Cmd.completenames(self, text, line, begidx, endidex)

    if len(r) == 1 and "sub_" + r[0] in dir(self):
      return [r[0] + " "]

    return r
Beispiel #4
0
    def completenames(self, text, *ignored):
        result = Cmd.completenames(self, text, *ignored)

        for cmd in self.command.list:
            if cmd.startswith(text):
                result.append(cmd)

        return result
Beispiel #5
0
 def completenames(self, text, *ignored):
     return [name for name in Cmd.completenames(self, text, *ignored) if name not in self.hidden_commands]
Beispiel #6
0
 def completenames(self, text, *ignored):
     return [
         name for name in Cmd.completenames(self, text, *ignored)
         if name not in self.hidden_commands
     ]
Beispiel #7
0
 def completenames(self, text, *ignored):
     return Cmd.completenames(self, text, *ignored)
Beispiel #8
0
 def completenames(self, text, *ignored):
     items = Cmd.completenames(self, text, *ignored)
         # Try cvar completion
     items.extend([a for a in self._custom_complete if a.startswith(text)])
     return items