aboutsummaryrefslogtreecommitdiff
path: root/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'hush.c')
-rw-r--r--hush.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hush.c b/hush.c
index 5c129ce17..372c95753 100644
--- a/hush.c
+++ b/hush.c
@@ -891,6 +891,7 @@ static void get_user_input(struct in_str *i)
891 the_command[0]=fgetc(i->file); 891 the_command[0]=fgetc(i->file);
892 the_command[1]='\0'; 892 the_command[1]='\0';
893#endif 893#endif
894 fflush(stdout);
894 i->p = the_command; 895 i->p = the_command;
895} 896}
896 897
@@ -908,7 +909,9 @@ static int file_get(struct in_str *i)
908 /* need to double check i->file because we might be doing something 909 /* need to double check i->file because we might be doing something
909 * more complicated by now, like sourcing or substituting. */ 910 * more complicated by now, like sourcing or substituting. */
910 if (i->__promptme && interactive && i->file == stdin) { 911 if (i->__promptme && interactive && i->file == stdin) {
911 get_user_input(i); 912 while(! i->p || (interactive && strlen(i->p)==0) ) {
913 get_user_input(i);
914 }
912 i->promptmode=2; 915 i->promptmode=2;
913 i->__promptme = 0; 916 i->__promptme = 0;
914 if (i->p && *i->p) { 917 if (i->p && *i->p) {