diff options
author | Richard Braun <rbraun@sceen.net> | 2016-12-24 12:00:00 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2016-12-24 12:00:00 +0100 |
commit | b4ea88ef4530f450ce2b44c2f09c510f2bea0f9b (patch) | |
tree | 8458ec53e24f3d711c55964a9905bb40d62ab6c2 | |
parent | b5d93168c2996d314a8cc79cd6939c34f1ac7fe7 (diff) |
shell: fix completion regression
Commit 5b0ec6b075662d24fb72acf394335731fd9db5ba introduced a regression
where arguments already input by the user would be erased instead of
preserved. This change fixes this.
-rw-r--r-- | shell.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |