diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-02-16 20:09:17 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-02-16 20:09:17 +0000 |
commit | 6faae7deb4b88dccffb7dbbf267315cb7bbc0af9 (patch) | |
tree | 550531e0e4027c69a6cca27fde31574c75e26104 /sh.c | |
parent | 361ee514c636b371a50554ab73a3bfd54a49804d (diff) | |
download | busybox-w32-6faae7deb4b88dccffb7dbbf267315cb7bbc0af9.tar.gz busybox-w32-6faae7deb4b88dccffb7dbbf267315cb7bbc0af9.tar.bz2 busybox-w32-6faae7deb4b88dccffb7dbbf267315cb7bbc0af9.zip |
Commit Vladimir's latest cmdedit. I modified it slightly to ensure
parse_prompt() would be called before cmdedit_init(), since cmdedit_init()
calls cmdedit_setwidth() which uses cmdedit_prmt_len, which is set by
parse_prompt(). Also, added a mod, so very narrow terminals should now wrap
properly... This is working very nicely for me -- Vladimir has done some
very good work.
Diffstat (limited to 'sh.c')
-rw-r--r-- | sh.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -854,10 +854,9 @@ static int get_command(FILE * source, char *command) | |||
854 | ** atexit() handlers and other unwanted stuff to our | 854 | ** atexit() handlers and other unwanted stuff to our |
855 | ** child processes (rob@sysgo.de) | 855 | ** child processes (rob@sysgo.de) |
856 | */ | 856 | */ |
857 | cmdedit_init(); | ||
858 | cmdedit_read_input(prompt_str, command); | 857 | cmdedit_read_input(prompt_str, command); |
859 | free(prompt_str); | ||
860 | cmdedit_terminate(); | 858 | cmdedit_terminate(); |
859 | free(prompt_str); | ||
861 | return 0; | 860 | return 0; |
862 | #else | 861 | #else |
863 | fputs(prompt_str, stdout); | 862 | fputs(prompt_str, stdout); |