def complete_ls(self, text, line, begidx, endidx):
        """completion for ls command"""

        options = self.LS_OPTS

        if not text:
            completions = options
        else:
            completions = [f
                           for f in options
                           if f.startswith(text)
                           ]
        return completions
def complete_ls ( self , text , line , begidx , endidx ) : options = self . LS_OPTS if not text : completions = options else : completions = [ f for f in options if f . startswith ( text ) ] return completions
completion for ls command