mirror of https://github.com/mirror/busybox.git
parent
5661fe078e
commit
d4bc1fcad8
4
lash.c
4
lash.c
|
@ -394,10 +394,10 @@ static int getCommand(FILE * source, char *command)
|
||||||
#ifdef BB_FEATURE_SH_COMMAND_EDITING
|
#ifdef BB_FEATURE_SH_COMMAND_EDITING
|
||||||
int len;
|
int len;
|
||||||
char *promptStr;
|
char *promptStr;
|
||||||
len=fprintf(stdout, "BBSHELL %s %s", cwd, prompt);
|
len=fprintf(stdout, "%s %s", cwd, prompt);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
promptStr=(char*)malloc(sizeof(char)*(len+1));
|
promptStr=(char*)malloc(sizeof(char)*(len+1));
|
||||||
sprintf(promptStr, "BBSHELL %s %s", cwd, prompt);
|
sprintf(promptStr, "%s %s", cwd, prompt);
|
||||||
cmdedit_read_input(promptStr, fileno(stdin), fileno(stdout), command);
|
cmdedit_read_input(promptStr, fileno(stdin), fileno(stdout), command);
|
||||||
free( promptStr);
|
free( promptStr);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
4
sh.c
4
sh.c
|
@ -394,10 +394,10 @@ static int getCommand(FILE * source, char *command)
|
||||||
#ifdef BB_FEATURE_SH_COMMAND_EDITING
|
#ifdef BB_FEATURE_SH_COMMAND_EDITING
|
||||||
int len;
|
int len;
|
||||||
char *promptStr;
|
char *promptStr;
|
||||||
len=fprintf(stdout, "BBSHELL %s %s", cwd, prompt);
|
len=fprintf(stdout, "%s %s", cwd, prompt);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
promptStr=(char*)malloc(sizeof(char)*(len+1));
|
promptStr=(char*)malloc(sizeof(char)*(len+1));
|
||||||
sprintf(promptStr, "BBSHELL %s %s", cwd, prompt);
|
sprintf(promptStr, "%s %s", cwd, prompt);
|
||||||
cmdedit_read_input(promptStr, fileno(stdin), fileno(stdout), command);
|
cmdedit_read_input(promptStr, fileno(stdin), fileno(stdout), command);
|
||||||
free( promptStr);
|
free( promptStr);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -394,10 +394,10 @@ static int getCommand(FILE * source, char *command)
|
||||||
#ifdef BB_FEATURE_SH_COMMAND_EDITING
|
#ifdef BB_FEATURE_SH_COMMAND_EDITING
|
||||||
int len;
|
int len;
|
||||||
char *promptStr;
|
char *promptStr;
|
||||||
len=fprintf(stdout, "BBSHELL %s %s", cwd, prompt);
|
len=fprintf(stdout, "%s %s", cwd, prompt);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
promptStr=(char*)malloc(sizeof(char)*(len+1));
|
promptStr=(char*)malloc(sizeof(char)*(len+1));
|
||||||
sprintf(promptStr, "BBSHELL %s %s", cwd, prompt);
|
sprintf(promptStr, "%s %s", cwd, prompt);
|
||||||
cmdedit_read_input(promptStr, fileno(stdin), fileno(stdout), command);
|
cmdedit_read_input(promptStr, fileno(stdin), fileno(stdout), command);
|
||||||
free( promptStr);
|
free( promptStr);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue