aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lash.c4
-rw-r--r--sh.c4
-rw-r--r--shell/lash.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/lash.c b/lash.c
index dd1d3aa5c..3d54b439e 100644
--- a/lash.c
+++ b/lash.c
@@ -774,9 +774,9 @@ static int get_command(FILE * source, char *command)
return 1;
}
- prompt_str = setup_prompt_string(shell_context);
-
if (source == stdin) {
+ prompt_str = setup_prompt_string(shell_context);
+
#ifdef BB_FEATURE_SH_COMMAND_EDITING
/*
** enable command line editing only while a command line
diff --git a/sh.c b/sh.c
index dd1d3aa5c..3d54b439e 100644
--- a/sh.c
+++ b/sh.c
@@ -774,9 +774,9 @@ static int get_command(FILE * source, char *command)
return 1;
}
- prompt_str = setup_prompt_string(shell_context);
-
if (source == stdin) {
+ prompt_str = setup_prompt_string(shell_context);
+
#ifdef BB_FEATURE_SH_COMMAND_EDITING
/*
** enable command line editing only while a command line
diff --git a/shell/lash.c b/shell/lash.c
index dd1d3aa5c..3d54b439e 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -774,9 +774,9 @@ static int get_command(FILE * source, char *command)
return 1;
}
- prompt_str = setup_prompt_string(shell_context);
-
if (source == stdin) {
+ prompt_str = setup_prompt_string(shell_context);
+
#ifdef BB_FEATURE_SH_COMMAND_EDITING
/*
** enable command line editing only while a command line