py/repl: Check for an identifier char after the keyword.

- As described in the #1850.
- Add cmdline tests.
diff --git a/py/repl.c b/py/repl.c
index 182961b..de0e8a4 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -38,7 +38,7 @@
             return false;
         }
     }
-    return head[i] == '\0' && (str[i] == '\0' || !unichar_isalpha(str[i]));
+    return head[i] == '\0' && (str[i] == '\0' || !unichar_isident(str[i]));
 }
 
 bool mp_repl_continue_with_input(const char *input) {