def previous_history_or_previous_completion(event):
 event.current_buffer.auto_up()

def previous_history_or_previous_completion ( event ) : event . current_buffer . auto_up ( )
control-p in vi edit mode on readline is history next .