diff options
Diffstat (limited to 'shell/msh.c')
-rw-r--r-- | shell/msh.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/shell/msh.c b/shell/msh.c index 8746e42bc..15ce9ffdd 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -58,7 +58,7 @@ int mshdbg_rc = 0; | |||
58 | #endif /* MSHDEBUG */ | 58 | #endif /* MSHDEBUG */ |
59 | 59 | ||
60 | 60 | ||
61 | #ifdef CONFIG_FEATURE_SH_FANCY_PROMPT | 61 | #if ENABLE_FEATURE_EDITING_FANCY_PROMPT |
62 | # define DEFAULT_ROOT_PROMPT "\\u:\\w> " | 62 | # define DEFAULT_ROOT_PROMPT "\\u:\\w> " |
63 | # define DEFAULT_USER_PROMPT "\\u:\\w$ " | 63 | # define DEFAULT_USER_PROMPT "\\u:\\w$ " |
64 | #else | 64 | #else |
@@ -776,7 +776,7 @@ void print_tree(struct op *head) | |||
776 | #endif /* MSHDEBUG */ | 776 | #endif /* MSHDEBUG */ |
777 | 777 | ||
778 | 778 | ||
779 | #if ENABLE_FEATURE_COMMAND_EDITING | 779 | #if ENABLE_FEATURE_EDITING |
780 | static char *current_prompt; | 780 | static char *current_prompt; |
781 | #endif | 781 | #endif |
782 | 782 | ||
@@ -786,7 +786,7 @@ static char *current_prompt; | |||
786 | */ | 786 | */ |
787 | 787 | ||
788 | 788 | ||
789 | #if ENABLE_FEATURE_COMMAND_EDITING | 789 | #if ENABLE_FEATURE_EDITING |
790 | static line_input_t *line_input_state; | 790 | static line_input_t *line_input_state; |
791 | #endif | 791 | #endif |
792 | 792 | ||
@@ -798,7 +798,7 @@ int msh_main(int argc, char **argv) | |||
798 | char *name, **ap; | 798 | char *name, **ap; |
799 | int (*iof) (struct ioarg *); | 799 | int (*iof) (struct ioarg *); |
800 | 800 | ||
801 | #if ENABLE_FEATURE_COMMAND_EDITING | 801 | #if ENABLE_FEATURE_EDITING |
802 | line_input_state = new_line_input_t(FOR_SHELL); | 802 | line_input_state = new_line_input_t(FOR_SHELL); |
803 | #endif | 803 | #endif |
804 | 804 | ||
@@ -847,7 +847,7 @@ int msh_main(int argc, char **argv) | |||
847 | #endif | 847 | #endif |
848 | 848 | ||
849 | prompt = lookup("PS1"); | 849 | prompt = lookup("PS1"); |
850 | #ifdef CONFIG_FEATURE_SH_FANCY_PROMPT | 850 | #if ENABLE_FEATURE_EDITING_FANCY_PROMPT |
851 | if (prompt->value == null) | 851 | if (prompt->value == null) |
852 | #endif | 852 | #endif |
853 | setval(prompt, DEFAULT_USER_PROMPT); | 853 | setval(prompt, DEFAULT_USER_PROMPT); |
@@ -856,7 +856,7 @@ int msh_main(int argc, char **argv) | |||
856 | prompt->status &= ~EXPORT; | 856 | prompt->status &= ~EXPORT; |
857 | } | 857 | } |
858 | cprompt = lookup("PS2"); | 858 | cprompt = lookup("PS2"); |
859 | #ifdef CONFIG_FEATURE_SH_FANCY_PROMPT | 859 | #if ENABLE_FEATURE_EDITING_FANCY_PROMPT |
860 | if (cprompt->value == null) | 860 | if (cprompt->value == null) |
861 | #endif | 861 | #endif |
862 | setval(cprompt, "> "); | 862 | setval(cprompt, "> "); |
@@ -929,7 +929,7 @@ int msh_main(int argc, char **argv) | |||
929 | PUSHIO(afile, 0, iof); | 929 | PUSHIO(afile, 0, iof); |
930 | if (isatty(0) && isatty(1) && !cflag) { | 930 | if (isatty(0) && isatty(1) && !cflag) { |
931 | interactive++; | 931 | interactive++; |
932 | #ifndef CONFIG_FEATURE_SH_EXTRA_QUIET | 932 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET |
933 | #ifdef MSHDEBUG | 933 | #ifdef MSHDEBUG |
934 | printf("\n\n%s Built-in shell (msh with debug)\n", BB_BANNER); | 934 | printf("\n\n%s Built-in shell (msh with debug)\n", BB_BANNER); |
935 | #else | 935 | #else |
@@ -971,7 +971,7 @@ int msh_main(int argc, char **argv) | |||
971 | 971 | ||
972 | for (;;) { | 972 | for (;;) { |
973 | if (interactive && e.iop <= iostack) { | 973 | if (interactive && e.iop <= iostack) { |
974 | #if ENABLE_FEATURE_COMMAND_EDITING | 974 | #if ENABLE_FEATURE_EDITING |
975 | current_prompt = prompt->value; | 975 | current_prompt = prompt->value; |
976 | #else | 976 | #else |
977 | prs(prompt->value); | 977 | prs(prompt->value); |
@@ -2378,7 +2378,7 @@ static int yylex(int cf) | |||
2378 | startl = 1; | 2378 | startl = 1; |
2379 | if (multiline || cf & CONTIN) { | 2379 | if (multiline || cf & CONTIN) { |
2380 | if (interactive && e.iop <= iostack) { | 2380 | if (interactive && e.iop <= iostack) { |
2381 | #if ENABLE_FEATURE_COMMAND_EDITING | 2381 | #if ENABLE_FEATURE_EDITING |
2382 | current_prompt = cprompt->value; | 2382 | current_prompt = cprompt->value; |
2383 | #else | 2383 | #else |
2384 | prs(cprompt->value); | 2384 | prs(cprompt->value); |
@@ -2439,7 +2439,7 @@ static int collect(int c, int c1) | |||
2439 | return YYERRCODE; | 2439 | return YYERRCODE; |
2440 | } | 2440 | } |
2441 | if (interactive && c == '\n' && e.iop <= iostack) { | 2441 | if (interactive && c == '\n' && e.iop <= iostack) { |
2442 | #if ENABLE_FEATURE_COMMAND_EDITING | 2442 | #if ENABLE_FEATURE_EDITING |
2443 | current_prompt = cprompt->value; | 2443 | current_prompt = cprompt->value; |
2444 | #else | 2444 | #else |
2445 | prs(cprompt->value); | 2445 | prs(cprompt->value); |
@@ -3289,7 +3289,7 @@ static int dohelp(struct op *t) | |||
3289 | col = 0; | 3289 | col = 0; |
3290 | } | 3290 | } |
3291 | } | 3291 | } |
3292 | #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL | 3292 | #if ENABLE_FEATURE_SH_STANDALONE_SHELL |
3293 | { | 3293 | { |
3294 | int i; | 3294 | int i; |
3295 | const struct BB_applet *applet; | 3295 | const struct BB_applet *applet; |
@@ -4673,7 +4673,7 @@ static int readc(void) | |||
4673 | return e.iop->prev = 0; | 4673 | return e.iop->prev = 0; |
4674 | } | 4674 | } |
4675 | if (interactive && e.iop == iostack + 1) { | 4675 | if (interactive && e.iop == iostack + 1) { |
4676 | #if ENABLE_FEATURE_COMMAND_EDITING | 4676 | #if ENABLE_FEATURE_EDITING |
4677 | current_prompt = prompt->value; | 4677 | current_prompt = prompt->value; |
4678 | #else | 4678 | #else |
4679 | prs(prompt->value); | 4679 | prs(prompt->value); |
@@ -4905,7 +4905,7 @@ static int filechar(struct ioarg *ap) | |||
4905 | ap->afpos++; | 4905 | ap->afpos++; |
4906 | return *bp->bufp++ & 0177; | 4906 | return *bp->bufp++ & 0177; |
4907 | } | 4907 | } |
4908 | #if ENABLE_FEATURE_COMMAND_EDITING | 4908 | #if ENABLE_FEATURE_EDITING |
4909 | if (interactive && isatty(ap->afile)) { | 4909 | if (interactive && isatty(ap->afile)) { |
4910 | static char mycommand[BUFSIZ]; | 4910 | static char mycommand[BUFSIZ]; |
4911 | static int position = 0, size = 0; | 4911 | static int position = 0, size = 0; |
@@ -5156,7 +5156,7 @@ static void readhere(char **name, char *s, int ec) | |||
5156 | e.iobase = e.iop; | 5156 | e.iobase = e.iop; |
5157 | for (;;) { | 5157 | for (;;) { |
5158 | if (interactive && e.iop <= iostack) { | 5158 | if (interactive && e.iop <= iostack) { |
5159 | #if ENABLE_FEATURE_COMMAND_EDITING | 5159 | #if ENABLE_FEATURE_EDITING |
5160 | current_prompt = cprompt->value; | 5160 | current_prompt = cprompt->value; |
5161 | #else | 5161 | #else |
5162 | prs(cprompt->value); | 5162 | prs(cprompt->value); |