summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/shell.c b/shell.c
index 9040824..e91cb90 100644
--- a/shell.c
+++ b/shell.c
@@ -854,9 +854,17 @@ shell_process_tabulation(void)
}
if (error == ERR_AGAIN) {
+ unsigned long cursor;
+
+ cursor = shell_cursor;
shell_cmd_print_matches(cmd, size);
shell_prompt();
shell_restore();
+
+ /* Keep existing arguments as they are */
+ while (shell_cursor != cursor) {
+ shell_process_left();
+ }
}
name = shell_cmd_name(cmd);