MCPcopy Index your code
hub / github.com/idank/explainshell / list_manpages

Method list_manpages

explainshell/store.py:650–659  ·  view source on GitHub ↗

List source paths that start with *prefix*. Uses a range scan on the ``manpages`` primary key index.

(self, prefix: str)

Source from the content-addressed store, hash-verified

648 return [row["section"] for row in rows]
649
650 def list_manpages(self, prefix: str) -> list[str]:
651 """List source paths that start with *prefix*.
652
653 Uses a range scan on the ``manpages`` primary key index.
654 """
655 rows = self._conn.execute(
656 "SELECT source FROM manpages WHERE source >= ? AND source < ?",
657 (prefix, prefix[:-1] + chr(ord(prefix[-1]) + 1)),
658 ).fetchall()
659 return [row["source"] for row in rows]
660
661 def get_raw_manpage(self, source: str) -> RawManpage | None:
662 """Fetch and decompress a raw manpage.

Callers 5

show_manpagesFunction · 0.95
manpage_listFunction · 0.80
test_empty_resultMethod · 0.80

Calls

no outgoing calls