Browse Source

unix: Add exit and paste-mode hints to shell startup banner.

Thanks to @nyov for the initial patch.
pull/1505/head
Damien George 9 years ago
parent
commit
3aa7dd23c9
  1. 1
      tests/cmdline/repl_basic.py.exp
  2. 1
      tests/cmdline/repl_cont.py.exp
  3. 1
      tests/cmdline/repl_emacs_keys.py.exp
  4. 1
      tests/feature_check/repl_emacs_check.py.exp
  5. 3
      unix/main.c

1
tests/cmdline/repl_basic.py.exp

@ -1,4 +1,5 @@
MicroPython \.\+ version MicroPython \.\+ version
Use \.\+
>>> # basic REPL tests >>> # basic REPL tests
>>> print(1) >>> print(1)
1 1

1
tests/cmdline/repl_cont.py.exp

@ -1,4 +1,5 @@
MicroPython \.\+ version MicroPython \.\+ version
Use \.\+
>>> # check REPL allows to continue input >>> # check REPL allows to continue input
>>> 1 \\\\ >>> 1 \\\\
... + 2 ... + 2

1
tests/cmdline/repl_emacs_keys.py.exp

@ -1,4 +1,5 @@
MicroPython \.\+ version MicroPython \.\+ version
Use \.\+
>>> # REPL tests of GNU-ish readline navigation >>> # REPL tests of GNU-ish readline navigation
>>> # history buffer navigation >>> # history buffer navigation
>>> 1 >>> 1

1
tests/feature_check/repl_emacs_check.py.exp

@ -1,4 +1,5 @@
MicroPython \.\+ version MicroPython \.\+ version
Use \.\+
>>> # Check for emacs keys in REPL >>> # Check for emacs keys in REPL
>>> t = \.\+ >>> t = \.\+
>>> t == 2 >>> t == 2

3
unix/main.c

@ -153,7 +153,8 @@ STATIC char *strjoin(const char *s1, int sep_char, const char *s2) {
#endif #endif
STATIC int do_repl(void) { STATIC int do_repl(void) {
mp_hal_stdout_tx_str("MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_PY_SYS_PLATFORM " version\n"); mp_hal_stdout_tx_str("MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; "
MICROPY_PY_SYS_PLATFORM " version\nUse CTRL-D to exit, CTRL-E for paste mode\n");
#if MICROPY_USE_READLINE == 1 #if MICROPY_USE_READLINE == 1

Loading…
Cancel
Save