src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/edit/builtins.d.elv (about) 1 # Converts a normal map into a binding map. 2 fn binding-table {|map| } 3 4 # Closes the current active mode. 5 fn close-mode { } 6 7 # Adds a notification saying "End of history". 8 fn end-of-history { } 9 10 # Triggers a redraw. 11 # 12 # The `&full` option controls whether to do a full redraw. By default, all 13 # redraws performed by the line editor are incremental redraws, updating only 14 # the part of the screen that has changed from the last redraw. A full redraw 15 # updates the entire command line. 16 fn redraw {|&full=$false| } 17 18 # Clears the screen. 19 # 20 # This command should be used in place of the external `clear` command to clear 21 # the screen. 22 fn clear { } 23 24 # Requests the next terminal input to be inserted uninterpreted. 25 fn insert-raw { } 26 27 # Parses a string into a key. 28 fn key {|string| } 29 30 # Prints a notification message. The argument may be a string or a [styled 31 # text](builtin.html#styled). 32 # 33 # If called while the editor is active, this will print the message above the 34 # editor, and redraw the editor. 35 # 36 # If called while the editor is inactive, the message will be queued, and shown 37 # once the editor becomes active. 38 fn notify {|message| } 39 40 # Causes the Elvish REPL to end the current read iteration and evaluate the 41 # code it just read. If called from a key binding, takes effect after the key 42 # binding returns. 43 fn return-line { } 44 45 # Causes the Elvish REPL to terminate. If called from a key binding, takes 46 # effect after the key binding returns. 47 fn return-eof { } 48 49 # If the current code is syntactically incomplete (like `echo [`), inserts a 50 # literal newline. 51 # 52 # Otherwise, applies any pending autofixes and accepts the current line. 53 fn smart-enter { } 54 55 # Breaks Elvish code into words. 56 fn wordify {|code| }