MCPcopy Create free account
hub / github.com/HexHive/NASS / complete

Method complete

tools/gef.py:9689–9701  ·  view source on GitHub ↗
(self, text: str, word: str)

Source from the content-addressed store, hash-verified

9687 return
9688
9689 def complete(self, text: str, word: str) -> List[str]:
9690 settings = sorted(gef.config)
9691
9692 if text == "":
9693 # no prefix: example: `gef config TAB`
9694 return [s for s in settings if word in s]
9695
9696 if "." not in text:
9697 # if looking for possible prefix
9698 return [s for s in settings if s.startswith(text.strip())]
9699
9700 # finally, look for possible values for given prefix
9701 return [s.split(".", 1)[1] for s in settings if s.startswith(text.strip())]
9702
9703
9704class GefSaveCommand(gdb.Command):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected