MCPcopy Index your code
hub / github.com/ipython/ipython / accept_word

Function accept_word

IPython/terminal/shortcuts/auto_suggest.py:493–501  ·  view source on GitHub ↗

Fill partial autosuggestion by word

(event: KeyPressEvent)

Source from the content-addressed store, hash-verified

491
492
493def accept_word(event: KeyPressEvent):
494 """Fill partial autosuggestion by word"""
495 buffer = event.current_buffer
496 suggestion = buffer.suggestion
497 if suggestion:
498 t = re.split(r"(\S+\s+)", suggestion.text)
499 buffer.insert_text(next((x for x in t if x), ""))
500 else:
501 nc.forward_word(event)
502
503
504def accept_character(event: KeyPressEvent):

Callers 1

test_accept_wordFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_accept_wordFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…