aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmdline.c11
-rw-r--r--src/core-commands.c1
2 files changed, 9 insertions, 3 deletions
diff --git a/src/cmdline.c b/src/cmdline.c
index 8b2aebd..e7761aa 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -1521,12 +1521,17 @@ teco_state_save_cmdline_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg
return &teco_state_start;
}
-/*$ *q
+/*$ "*q" "E*" "E*q"
* *q -- Save last command line
+ * E*q
*
- * Only at the very beginning of a command-line, this command
- * may be used to save the last command line as a string in
+ * This command may be used to save the last command line as a string in
* Q-Register <q>.
+ * Only at the very beginning of a command line you can also write
+ * \(lq*\(rq without a preceding \(lqE\(rq.
+ */
+/*
+ * FIXME: E*q is allowed but pointless in batch mode.
*/
TECO_DEFINE_STATE_EXPECTQREG(teco_state_save_cmdline,
.expectqreg.type = TECO_QREG_OPTIONAL_INIT,
diff --git a/src/core-commands.c b/src/core-commands.c
index 9c70825..58a1ea2 100644
--- a/src/core-commands.c
+++ b/src/core-commands.c
@@ -2884,6 +2884,7 @@ teco_state_ecommand_input(teco_machine_main_t *ctx, gunichar chr, GError **error
/*
* Simple Transitions
*/
+ ['*'] = {&teco_state_save_cmdline},
['%'] = {&teco_state_epctcommand,
.modifier_at = TRUE},
['B'] = {&teco_state_edit_file,