summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMark Whitley2001-03-14 00:29:14 +0000
committerMark Whitley2001-03-14 00:29:14 +0000
commitf594986b3745e5b483d699425df61babab816114 (patch)
tree47f18a0199d8436d2d663ffa15fbdee4855bba35 /shell
parentc75f83d8740c57cd498056d43170cbdca0729275 (diff)
downloadbusybox-f594986b3745e5b483d699425df61babab816114.zip
busybox-f594986b3745e5b483d699425df61babab816114.tar.gz
- Changed name of BB_FEATURE_SIMPLE_PROMPT to BB_FEATURE_SH_SIMPLE_PROMPT
- Set BB_FEATURE_SH_STANDALONE_SHELL and BB_FEATURE_SH_APPLETS_ALWAYS_WIN to be off by default - Set BB_FEATURE_SH_SIMPLE_PROMPT to be on by default - Added some more magic to the Olympus section to make all the dependencies on the shell, cmdline editing, tab completion and friend work properly. - Tidied up the Olympus section with some whitespace. Checked the various scrips that parse through there and the extra whitespace shouldn't break anything.
Diffstat (limited to 'shell')
-rw-r--r--shell/cmdedit.c16
-rw-r--r--shell/lash.c6
2 files changed, 11 insertions, 11 deletions
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index 1b5cbbf..7f403b4 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -55,7 +55,7 @@
#define BB_FEATURE_COMMAND_TAB_COMPLETION
#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
#define BB_FEATURE_NONPRINTABLE_INVERSE_PUT
-#undef BB_FEATURE_SIMPLE_PROMPT
+#undef BB_FEATURE_SH_SIMPLE_PROMPT
#define BB_FEATURE_CLEAN_UP
#define D(x) x
@@ -80,7 +80,7 @@
#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
#endif
-#if defined(BB_FEATURE_COMMAND_USERNAME_COMPLETION) || !defined(BB_FEATURE_SIMPLE_PROMPT)
+#if defined(BB_FEATURE_COMMAND_USERNAME_COMPLETION) || !defined(BB_FEATURE_SH_SIMPLE_PROMPT)
#define BB_FEATURE_GETUSERNAME_AND_HOMEDIR
#endif
@@ -178,7 +178,7 @@ static int cursor; /* required global for signal handler */
static int len; /* --- "" - - "" - -"- --""-- --""--- */
static char *command_ps; /* --- "" - - "" - -"- --""-- --""--- */
static
-#ifdef BB_FEATURE_SIMPLE_PROMPT
+#ifdef BB_FEATURE_SH_SIMPLE_PROMPT
const
#endif
char *cmdedit_prompt; /* --- "" - - "" - -"- --""-- --""--- */
@@ -193,7 +193,7 @@ static char *home_pwd_buf = "";
static int my_euid;
#endif
-#ifndef BB_FEATURE_SIMPLE_PROMPT
+#ifndef BB_FEATURE_SH_SIMPLE_PROMPT
static char *hostname_buf = "";
static int num_ok_lines = 1;
#endif
@@ -362,7 +362,7 @@ static void put_prompt(void)
cursor = 0;
}
-#ifdef BB_FEATURE_SIMPLE_PROMPT
+#ifdef BB_FEATURE_SH_SIMPLE_PROMPT
static void parse_prompt(const char *prmt_ptr)
{
cmdedit_prompt = prmt_ptr;
@@ -1510,7 +1510,7 @@ extern void cmdedit_read_input(char *prompt, char command[BUFSIZ])
history_counter++;
}
}
-#if !defined(BB_FEATURE_SIMPLE_PROMPT)
+#if !defined(BB_FEATURE_SH_SIMPLE_PROMPT)
num_ok_lines++;
#endif
}
@@ -1519,7 +1519,7 @@ extern void cmdedit_read_input(char *prompt, char command[BUFSIZ])
#if defined(BB_FEATURE_CLEAN_UP) && defined(BB_FEATURE_COMMAND_TAB_COMPLETION)
input_tab(0); /* strong free */
#endif
-#if !defined(BB_FEATURE_SIMPLE_PROMPT)
+#if !defined(BB_FEATURE_SH_SIMPLE_PROMPT)
free(cmdedit_prompt);
#endif
return;
@@ -1551,7 +1551,7 @@ int main(int argc, char **argv)
{
char buff[BUFSIZ];
char *prompt =
-#if !defined(BB_FEATURE_SIMPLE_PROMPT)
+#if !defined(BB_FEATURE_SH_SIMPLE_PROMPT)
"\\[\\033[32;1m\\]\\u@\\[\\x1b[33;1m\\]\\h:\
\\[\\033[34;1m\\]\\w\\[\\033[35;1m\\] \
\\!\\[\\e[36;1m\\]\\$ \\[\\E[0m\\]";
diff --git a/shell/lash.c b/shell/lash.c
index 49fb6b5..dcec14a 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -440,7 +440,7 @@ static int builtin_export(struct child_prog *child)
res = putenv(v);
if (res)
fprintf(stderr, "export: %m\n");
-#ifndef BB_FEATURE_SIMPLE_PROMPT
+#ifndef BB_FEATURE_SH_SIMPLE_PROMPT
if (strncmp(v, "PS1=", 4)==0)
PS1 = getenv("PS1");
else if (strncmp(v, "PS2=", 4)==0)
@@ -805,7 +805,7 @@ static void restore_redirects(int squirrel[])
static inline void cmdedit_set_initial_prompt(void)
{
-#ifdef BB_FEATURE_SIMPLE_PROMPT
+#ifdef BB_FEATURE_SH_SIMPLE_PROMPT
PS1 = NULL;
PS2 = "> ";
#else
@@ -821,7 +821,7 @@ static inline void cmdedit_set_initial_prompt(void)
static inline void setup_prompt_string(char **prompt_str)
{
-#ifdef BB_FEATURE_SIMPLE_PROMPT
+#ifdef BB_FEATURE_SH_SIMPLE_PROMPT
/* Set up the prompt */
if (shell_context == 0) {
if (PS1)