aboutsummaryrefslogtreecommitdiff
path: root/lib/mp-readline
AgeCommit message (Collapse)Author
2015-11-07lib/mp-readline: Make it easy to exit auto-indent mode by pressing enter.Damien George
This patch allows you to stop auto-indent by pressing enter on a second blank line. Easier than having to use backspace, and prevents new users from getting stuck in auto-indent mode.
2015-10-31all: Add py/mphal.h and use it in all ports.Damien George
py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
2015-10-26lib: Replace tabs with spaces in readline.cstijn
2015-10-20lib/mp-readline: Add n_chars argument to mp_hal_erase_line_from_cursor.Damien George
If VT100 support is not available then a given implementation of mp_hal_erase_line_from_cursor might need to know the number of characters to erase. This patch does not change generated code when VT100 is supported, since compiler can optimise away the argument.
2015-10-11repl: Add paste mode to friendly REPL, entered via CTRL-E.Damien George
Use CTRL-E to enter paste mode. Prompt starts with "===" and accepts all characters verbatim, echoing them back. Only control characters are CTRL-C which cancels the input and returns to normal REPL, and CTRL-D which ends the input and executes it. The input is executed as though it were a file. The input is not added to the prompt history.
2015-09-12lib/mp-readline: Add auto-indent support.Damien George
4 spaces are added at start of line to match previous indent, and if previous line ended in colon. Backspace deletes 4 space if only spaces begin a line. Configurable via MICROPY_REPL_AUTO_INDENT. Disabled by default.
2015-07-26lib/mp-readline: Add emacs-style control characters for cursor movement.Tom Soulanille
Disabled by default. Adds 108 bytes to Thumb2 arch when enabled.
2015-05-30lib/mp-readline: Allow overriding implementation of cursor functionsstijn
Default implementation uses VT100-style sequences which are not implemented by all terminals out there
2015-05-30lib/mp-readline: Add implementation for deleting a characterstijn
xterm and others use the ESC[~3 sequence when pressing the delete key
2015-05-27lib/mp-readline: Export readline_push_history function.Damien George
2015-04-29py, readline: Add tab autocompletion for REPL.Damien George
Can complete names in the global namespace, as well as a chain of attributes, eg pyb.Pin.board.<tab> will give a list of all board pins. Costs 700 bytes ROM on Thumb2 arch, but greatly increases usability of REPL prompt.
2015-04-29mp-readline: Save "prompt" string in readline state.Damien George
2015-02-13minimal: Allow to compile without defining MICROPY_HAL_H.Damien George
2015-02-13stmhal: Make pybstdio usable by other ports, and use it.Damien George
Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
2015-01-29py: Change vstr_null_terminate -> vstr_null_terminated_str, returns str.Damien George
2015-01-28py: Change vstr so that it doesn't null terminate buffer by default.Damien George
This cleans up vstr so that it's a pure "variable buffer", and the user can decide whether they need to add a terminating null byte. In most places where vstr is used, the vstr did not need to be null terminated and so this patch saves code size, a tiny bit of RAM, and makes vstr usage more efficient. When null termination is needed it must be done explicitly using vstr_null_terminate.
2015-01-25lib/mp-readline: Use simple VT100 commands to speed up line redraw.Damien George
2015-01-12py: Allow to compile with -Wstrict-prototypes.Damien George
2015-01-12py, unix, lib: Allow to compile with -Wold-style-definition.Damien George
2015-01-12lib/mp-readline: Refactor to support coroutine/event-driven usage.Paul Sokolovsky
readline_process_char() can be fed character by character, for example, received from external event loop. This will allow to integrate MicroPython into cooperative multitasking systems.
2015-01-12stmhal: Move readline code to lib/mp-readline/.Paul Sokolovsky