MCPcopy Create free account
hub / github.com/bpython/bpython / display_line_with_prompt

Method display_line_with_prompt

bpython/curtsiesfrontend/repl.py:1468–1481  ·  view source on GitHub ↗

colored line with prompt

(self)

Source from the content-addressed store, hash-verified

1466
1467 @property
1468 def display_line_with_prompt(self):
1469 """colored line with prompt"""
1470 prompt = func_for_letter(self.config.color_scheme["prompt"])
1471 more = func_for_letter(self.config.color_scheme["prompt_more"])
1472 if self.incr_search_mode == SearchMode.REVERSE_INCREMENTAL_SEARCH:
1473 return (
1474 prompt(f"(reverse-i-search)`{self.incr_search_target}': ")
1475 + self.current_line_formatted
1476 )
1477 elif self.incr_search_mode == SearchMode.INCREMENTAL_SEARCH:
1478 return prompt(f"(i-search)`%s': ") + self.current_line_formatted
1479 return (
1480 prompt(self.ps1) if self.done else more(self.ps2)
1481 ) + self.current_line_formatted
1482
1483 @property
1484 def current_cursor_line_without_suggestion(self):

Callers

nothing calls this directly

Calls 1

func_for_letterFunction · 0.85

Tested by

no test coverage detected