Skip to content

Commit 3aa7dd2

Browse files
committed
unix: Add exit and paste-mode hints to shell startup banner.
Thanks to @nyov for the initial patch.
1 parent fccbe9a commit 3aa7dd2

5 files changed

Lines changed: 6 additions & 1 deletion

File tree

tests/cmdline/repl_basic.py.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
MicroPython \.\+ version
2+
Use \.\+
23
>>> # basic REPL tests
34
>>> print(1)
45
1

tests/cmdline/repl_cont.py.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
MicroPython \.\+ version
2+
Use \.\+
23
>>> # check REPL allows to continue input
34
>>> 1 \\\\
45
... + 2

tests/cmdline/repl_emacs_keys.py.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
MicroPython \.\+ version
2+
Use \.\+
23
>>> # REPL tests of GNU-ish readline navigation
34
>>> # history buffer navigation
45
>>> 1

tests/feature_check/repl_emacs_check.py.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
MicroPython \.\+ version
2+
Use \.\+
23
>>> # Check for emacs keys in REPL
34
>>> t = \.\+
45
>>> t == 2

unix/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ STATIC char *strjoin(const char *s1, int sep_char, const char *s2) {
153153
#endif
154154

155155
STATIC int do_repl(void) {
156-
mp_hal_stdout_tx_str("MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_PY_SYS_PLATFORM " version\n");
156+
mp_hal_stdout_tx_str("MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; "
157+
MICROPY_PY_SYS_PLATFORM " version\nUse CTRL-D to exit, CTRL-E for paste mode\n");
157158

158159
#if MICROPY_USE_READLINE == 1
159160

0 commit comments

Comments
 (0)