'whether is a space or no text typed, send the current branch'

def gen_cmd_completions(self, text):

    if ((not text.split()) and self._is_command):
        if (self.branch.children is not None):
            for com in self.branch.children:
                (yield Completion(com.data))
    elif ((len(text.split()) > 0) and text[(-1)].isspace() and self._is_command):
        if (self.branch is not self.command_tree):
            for com in self.branch.children:
                (yield Completion(com.data))
