senf::term::bindings Namespace Reference

LineEditor key bindings. More...

Typedefs

typedef boost::function< void(LineEditor &, unsigned &b, unsigned &e, std::string &prefix, std::vector< std::string > &)> Completer
 

Functions

void selfInsertCommand (LineEditor &editor)
 Insert key as literal character. More...
 
void forwardChar (LineEditor &editor)
 Move one char forward. More...
 
void backwardChar (LineEditor &editor)
 Move one char backwards. More...
 
void accept (LineEditor &editor)
 Accept input line. More...
 
void acceptWithRepeat (LineEditor &editor)
 Accept, possibly repeat last history entry. More...
 
void backwardDeleteChar (LineEditor &editor)
 Delete char before cursor. More...
 
void deleteChar (LineEditor &editor)
 Delete char at cursor. More...
 
void beginningOfLine (LineEditor &editor)
 Move to beginning of line. More...
 
void endOfLine (LineEditor &editor)
 Move to end of line. More...
 
void deleteToEndOfLine (LineEditor &editor)
 Delete from cursor to end of line. More...
 
void restartEdit (LineEditor &editor)
 Clear edit buffer and restart edit. More...
 
void prevHistory (LineEditor &editor)
 Move to previous history entry. More...
 
void nextHistory (LineEditor &editor)
 Move to next history entry. More...
 
void clearScreen (LineEditor &editor)
 Clear screen and redisplay editor. More...
 
void complete (LineEditor &editor, Completer completer)
 Complete text at cursor. More...
 

Detailed Description

LineEditor key bindings.

Typedef Documentation

◆ Completer

typedef boost::function<void (LineEditor &, unsigned & b, unsigned & e, std::string & prefix, std::vector<std::string> &)> senf::term::bindings::Completer

Definition at line 344 of file Editor.hh.

Function Documentation

◆ accept()

void senf::term::bindings::accept ( LineEditor editor)

Accept input line.

Definition at line 572 of file Editor.cc.

◆ acceptWithRepeat()

void senf::term::bindings::acceptWithRepeat ( LineEditor editor)

Accept, possibly repeat last history entry.

Definition at line 577 of file Editor.cc.

◆ backwardChar()

void senf::term::bindings::backwardChar ( LineEditor editor)

Move one char backwards.

Definition at line 565 of file Editor.cc.

◆ backwardDeleteChar()

void senf::term::bindings::backwardDeleteChar ( LineEditor editor)

Delete char before cursor.

Definition at line 586 of file Editor.cc.

◆ beginningOfLine()

void senf::term::bindings::beginningOfLine ( LineEditor editor)

Move to beginning of line.

Definition at line 600 of file Editor.cc.

◆ clearScreen()

void senf::term::bindings::clearScreen ( LineEditor editor)

Clear screen and redisplay editor.

Definition at line 632 of file Editor.cc.

◆ complete()

void senf::term::bindings::complete ( LineEditor editor,
Completer  completer 
)

Complete text at cursor.

This function calls completer to find the list of possible completions for the text between b and e (as passed to the completer). The completer must add all possible completions to the completions vector.

See also
Completion support

Definition at line 639 of file Editor.cc.

◆ deleteChar()

void senf::term::bindings::deleteChar ( LineEditor editor)

Delete char at cursor.

Definition at line 595 of file Editor.cc.

◆ deleteToEndOfLine()

void senf::term::bindings::deleteToEndOfLine ( LineEditor editor)

Delete from cursor to end of line.

Definition at line 610 of file Editor.cc.

◆ endOfLine()

void senf::term::bindings::endOfLine ( LineEditor editor)

Move to end of line.

Definition at line 605 of file Editor.cc.

◆ forwardChar()

void senf::term::bindings::forwardChar ( LineEditor editor)

Move one char forward.

Definition at line 560 of file Editor.cc.

◆ nextHistory()

void senf::term::bindings::nextHistory ( LineEditor editor)

Move to next history entry.

Definition at line 627 of file Editor.cc.

◆ prevHistory()

void senf::term::bindings::prevHistory ( LineEditor editor)

Move to previous history entry.

Definition at line 622 of file Editor.cc.

◆ restartEdit()

void senf::term::bindings::restartEdit ( LineEditor editor)

Clear edit buffer and restart edit.

Definition at line 615 of file Editor.cc.

◆ selfInsertCommand()

void senf::term::bindings::selfInsertCommand ( LineEditor editor)

Insert key as literal character.

Definition at line 553 of file Editor.cc.