aboutsummaryrefslogtreecommitdiff
path: root/py/repl.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-26 17:55:31 +0100
committerDamien George <damien.p.george@gmail.com>2015-04-29 00:46:26 +0100
commita1a2c411b25bc5a709f719a8a955727f9d6e228f (patch)
tree9112861a8f12b886444e581a057de3369f0d37b7 /py/repl.h
parentb7a4f15b34a490040d87fbcffc728c9c3f64b85a (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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/repl.h b/py/repl.h
index db9256017..c34a5b869 100644
--- a/py/repl.h
+++ b/py/repl.h
@@ -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__