def do_ls(self, arg: str | None) -> str:
        """List contained items on a node.

        Examples
        ========

                > ls
                > ls ../layout
        """
        if arg:
            node, rest_path = self._find_path(arg)
            if not node:
                return "No such path."
            base_path = arg.rstrip("/") + "/"
        else:
            node = self._command_client
            rest_path = None
            base_path = ""

        assert node is not None

        objects, items = self._ls(node, rest_path)

        formatted_ls = [f"{base_path}{i}/" for i in objects] + [
            f"{base_path[:-1]}[{i}]/" for i in items
        ]
        return self.columnize(formatted_ls)
List contained items on a node.

        Examples
        ========

                > ls
                > ls ../layout
        
libqtile/sh.py