aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-03-14 00:29:14 +0000
committerMark Whitley <markw@lineo.com>2001-03-14 00:29:14 +0000
commitf594986b3745e5b483d699425df61babab816114 (patch)
tree47f18a0199d8436d2d663ffa15fbdee4855bba35 /shell
parentc75f83d8740c57cd498056d43170cbdca0729275 (diff)
downloadbusybox-w32-f594986b3745e5b483d699425df61babab816114.tar.gz
busybox-w32-f594986b3745e5b483d699425df61babab816114.tar.bz2
busybox-w32-f594986b3745e5b483d699425df61babab816114.zip
- 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 1b5cbbfab..7f403b44f 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -55,7 +55,7 @@
55#define BB_FEATURE_COMMAND_TAB_COMPLETION 55#define BB_FEATURE_COMMAND_TAB_COMPLETION
56#define BB_FEATURE_COMMAND_USERNAME_COMPLETION 56#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
57#define BB_FEATURE_NONPRINTABLE_INVERSE_PUT 57#define BB_FEATURE_NONPRINTABLE_INVERSE_PUT
58#undef BB_FEATURE_SIMPLE_PROMPT 58#undef BB_FEATURE_SH_SIMPLE_PROMPT
59#define BB_FEATURE_CLEAN_UP 59#define BB_FEATURE_CLEAN_UP
60 60
61#define D(x) x 61#define D(x) x
@@ -80,7 +80,7 @@
80#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION 80#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
81#endif 81#endif
82 82
83#if defined(BB_FEATURE_COMMAND_USERNAME_COMPLETION) || !defined(BB_FEATURE_SIMPLE_PROMPT) 83#if defined(BB_FEATURE_COMMAND_USERNAME_COMPLETION) || !defined(BB_FEATURE_SH_SIMPLE_PROMPT)
84#define BB_FEATURE_GETUSERNAME_AND_HOMEDIR 84#define BB_FEATURE_GETUSERNAME_AND_HOMEDIR
85#endif 85#endif
86 86
@@ -178,7 +178,7 @@ static int cursor; /* required global for signal handler */
178static int len; /* --- "" - - "" - -"- --""-- --""--- */ 178static int len; /* --- "" - - "" - -"- --""-- --""--- */
179static char *command_ps; /* --- "" - - "" - -"- --""-- --""--- */ 179static char *command_ps; /* --- "" - - "" - -"- --""-- --""--- */
180static 180static
181#ifdef BB_FEATURE_SIMPLE_PROMPT 181#ifdef BB_FEATURE_SH_SIMPLE_PROMPT
182 const 182 const
183#endif 183#endif
184char *cmdedit_prompt; /* --- "" - - "" - -"- --""-- --""--- */ 184char *cmdedit_prompt; /* --- "" - - "" - -"- --""-- --""--- */
@@ -193,7 +193,7 @@ static char *home_pwd_buf = "";
193static int my_euid; 193static int my_euid;
194#endif 194#endif
195 195
196#ifndef BB_FEATURE_SIMPLE_PROMPT 196#ifndef BB_FEATURE_SH_SIMPLE_PROMPT
197static char *hostname_buf = ""; 197static char *hostname_buf = "";
198static int num_ok_lines = 1; 198static int num_ok_lines = 1;
199#endif 199#endif
@@ -362,7 +362,7 @@ static void put_prompt(void)
362 cursor = 0; 362 cursor = 0;
363} 363}
364 364
365#ifdef BB_FEATURE_SIMPLE_PROMPT 365#ifdef BB_FEATURE_SH_SIMPLE_PROMPT
366static void parse_prompt(const char *prmt_ptr) 366static void parse_prompt(const char *prmt_ptr)
367{ 367{
368 cmdedit_prompt = prmt_ptr; 368 cmdedit_prompt = prmt_ptr;
@@ -1510,7 +1510,7 @@ extern void cmdedit_read_input(char *prompt, char command[BUFSIZ])
1510 history_counter++; 1510 history_counter++;
1511 } 1511 }
1512 } 1512 }
1513#if !defined(BB_FEATURE_SIMPLE_PROMPT) 1513#if !defined(BB_FEATURE_SH_SIMPLE_PROMPT)
1514 num_ok_lines++; 1514 num_ok_lines++;
1515#endif 1515#endif
1516 } 1516 }
@@ -1519,7 +1519,7 @@ extern void cmdedit_read_input(char *prompt, char command[BUFSIZ])
1519#if defined(BB_FEATURE_CLEAN_UP) && defined(BB_FEATURE_COMMAND_TAB_COMPLETION) 1519#if defined(BB_FEATURE_CLEAN_UP) && defined(BB_FEATURE_COMMAND_TAB_COMPLETION)
1520 input_tab(0); /* strong free */ 1520 input_tab(0); /* strong free */
1521#endif 1521#endif
1522#if !defined(BB_FEATURE_SIMPLE_PROMPT) 1522#if !defined(BB_FEATURE_SH_SIMPLE_PROMPT)
1523 free(cmdedit_prompt); 1523 free(cmdedit_prompt);
1524#endif 1524#endif
1525 return; 1525 return;
@@ -1551,7 +1551,7 @@ int main(int argc, char **argv)
1551{ 1551{
1552 char buff[BUFSIZ]; 1552 char buff[BUFSIZ];
1553 char *prompt = 1553 char *prompt =
1554#if !defined(BB_FEATURE_SIMPLE_PROMPT) 1554#if !defined(BB_FEATURE_SH_SIMPLE_PROMPT)
1555 "\\[\\033[32;1m\\]\\u@\\[\\x1b[33;1m\\]\\h:\ 1555 "\\[\\033[32;1m\\]\\u@\\[\\x1b[33;1m\\]\\h:\
1556\\[\\033[34;1m\\]\\w\\[\\033[35;1m\\] \ 1556\\[\\033[34;1m\\]\\w\\[\\033[35;1m\\] \
1557\\!\\[\\e[36;1m\\]\\$ \\[\\E[0m\\]"; 1557\\!\\[\\e[36;1m\\]\\$ \\[\\E[0m\\]";
diff --git a/shell/lash.c b/shell/lash.c
index 49fb6b536..dcec14aba 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -440,7 +440,7 @@ static int builtin_export(struct child_prog *child)
440 res = putenv(v); 440 res = putenv(v);
441 if (res) 441 if (res)
442 fprintf(stderr, "export: %m\n"); 442 fprintf(stderr, "export: %m\n");
443#ifndef BB_FEATURE_SIMPLE_PROMPT 443#ifndef BB_FEATURE_SH_SIMPLE_PROMPT
444 if (strncmp(v, "PS1=", 4)==0) 444 if (strncmp(v, "PS1=", 4)==0)
445 PS1 = getenv("PS1"); 445 PS1 = getenv("PS1");
446 else if (strncmp(v, "PS2=", 4)==0) 446 else if (strncmp(v, "PS2=", 4)==0)
@@ -805,7 +805,7 @@ static void restore_redirects(int squirrel[])
805 805
806static inline void cmdedit_set_initial_prompt(void) 806static inline void cmdedit_set_initial_prompt(void)
807{ 807{
808#ifdef BB_FEATURE_SIMPLE_PROMPT 808#ifdef BB_FEATURE_SH_SIMPLE_PROMPT
809 PS1 = NULL; 809 PS1 = NULL;
810 PS2 = "> "; 810 PS2 = "> ";
811#else 811#else
@@ -821,7 +821,7 @@ static inline void cmdedit_set_initial_prompt(void)
821 821
822static inline void setup_prompt_string(char **prompt_str) 822static inline void setup_prompt_string(char **prompt_str)
823{ 823{
824#ifdef BB_FEATURE_SIMPLE_PROMPT 824#ifdef BB_FEATURE_SH_SIMPLE_PROMPT
825 /* Set up the prompt */ 825 /* Set up the prompt */
826 if (shell_context == 0) { 826 if (shell_context == 0) {
827 if (PS1) 827 if (PS1)