am 6be163b1: merge from open-source master
Merge commit '6be163b167e986b4fafda9290e5d74fc3945b273' into kraken * commit '6be163b167e986b4fafda9290e5d74fc3945b273': Emit shell prompt even when in non-interactive mode.
This commit is contained in:
commit
c491fdc6f5
|
@ -175,6 +175,9 @@ pgetc(void)
|
|||
return pgetc_macro();
|
||||
}
|
||||
|
||||
int in_interactive_mode() {
|
||||
return parsefile != NULL && parsefile->fd == 0;
|
||||
}
|
||||
|
||||
static int
|
||||
preadfd(void)
|
||||
|
|
|
@ -46,6 +46,7 @@ extern int parsenleft; /* number of characters left in input buffer */
|
|||
extern char *parsenextc; /* next character in input buffer */
|
||||
extern int init_editline; /* 0 == not setup, 1 == OK, -1 == failed */
|
||||
|
||||
int in_interactive_mode();
|
||||
char *pfgets(char *, int);
|
||||
int pgetc(void);
|
||||
int preadbuffer(void);
|
||||
|
|
|
@ -1629,9 +1629,9 @@ setprompt(int which)
|
|||
if (!el)
|
||||
#endif
|
||||
#ifdef WITH_LINENOISE
|
||||
#else
|
||||
out2str(getprompt(NULL));
|
||||
if (! in_interactive_mode() )
|
||||
#endif
|
||||
out2str(getprompt(NULL));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue