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

Function accept

IPython/terminal/shortcuts/auto_suggest.py:477–484  ·  view source on GitHub ↗

Accept autosuggestion

(event: KeyPressEvent)

Source from the content-addressed store, hash-verified

475
476
477def accept(event: KeyPressEvent):
478 """Accept autosuggestion"""
479 buffer = event.current_buffer
480 suggestion = buffer.suggestion
481 if suggestion:
482 buffer.insert_text(suggestion.text)
483 else:
484 nc.forward_char(event)
485
486
487def discard(event: KeyPressEvent):

Callers 1

test_acceptFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_acceptFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…