diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-26 17:55:31 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-29 00:46:26 +0100 |
commit | a1a2c411b25bc5a709f719a8a955727f9d6e228f (patch) | |
tree | 9112861a8f12b886444e581a057de3369f0d37b7 /py/repl.h | |
parent | b7a4f15b34a490040d87fbcffc728c9c3f64b85a (diff) |
py, readline: Add tab autocompletion for REPL.
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.
Diffstat (limited to 'py/repl.h')
-rw-r--r-- | py/repl.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -28,9 +28,11 @@ #include "py/mpconfig.h" #include "py/misc.h" +#include "py/mpprint.h" #if MICROPY_HELPER_REPL bool mp_repl_continue_with_input(const char *input); +mp_uint_t mp_repl_autocomplete(const char *str, mp_uint_t len, const mp_print_t *print, const char **compl_str); #endif #endif // __MICROPY_INCLUDED_PY_REPL_H__ |