From 3b251857334fc3b7ae075905908d67a08885da76 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Sat, 3 Jan 2004 12:07:32 +0000 Subject: [PATCH] Declare dependencies of command line editing in the build system --- shell/Config.in | 79 ++++++++++++++++++++++++------------------------- shell/cmdedit.c | 12 +------- 2 files changed, 40 insertions(+), 51 deletions(-) diff --git a/shell/Config.in b/shell/Config.in index 016af719a..892b96e78 100644 --- a/shell/Config.in +++ b/shell/Config.in @@ -137,40 +137,12 @@ config CONFIG_MSH comment "Bourne Shell Options" depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH -config CONFIG_FEATURE_COMMAND_EDITING - bool "command line editing" +config CONFIG_FEATURE_SH_EXTRA_QUIET + bool "Hide message on interactive shell startup" default n depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH help - Enable command editing in shell. - -config CONFIG_FEATURE_COMMAND_SAVEHISTORY - bool " history saving" - default n - depends on CONFIG_ASH - help - Enable history saving in ash shell. - -config CONFIG_FEATURE_COMMAND_TAB_COMPLETION - bool "tab completion" - default n - depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH - help - Enable tab completion in shell. - -config CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION - bool "username completion" - default n - depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH - help - Enable username completion in shell. - -config CONFIG_FEATURE_COMMAND_HISTORY - int "history size" - default 15 - depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH - help - Specify command history size in shell. + Remove the busybox introduction when starting a shell. config CONFIG_FEATURE_SH_STANDALONE_SHELL bool "Standalone shell" @@ -188,20 +160,47 @@ config CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN Use a command builtin to the shell over one with the same name, that may be on the system. +config CONFIG_FEATURE_COMMAND_EDITING + bool "command line editing" + default n + depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH + help + Enable command editing in shell. + +config CONFIG_FEATURE_COMMAND_HISTORY + int "history size" + default 15 + depends on CONFIG_FEATURE_COMMAND_EDITING + help + Specify command history size in shell. + +config CONFIG_FEATURE_COMMAND_SAVEHISTORY + bool "history saving" + default n + depends on CONFIG_ASH && CONFIG_FEATURE_COMMAND_EDITING + help + Enable history saving in ash shell. + +config CONFIG_FEATURE_COMMAND_TAB_COMPLETION + bool "tab completion" + default n + depends on CONFIG_FEATURE_COMMAND_EDITING + help + Enable tab completion in shell. + +config CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION + bool "username completion" + default n + depends on CONFIG_FEATURE_COMMAND_TAB_COMPLETION + help + Enable username completion in shell. + config CONFIG_FEATURE_SH_FANCY_PROMPT bool "Fancy shell prompts" default n - depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH + depends on CONFIG_FEATURE_COMMAND_EDITING help Setting this option allows for prompts to use things like \w and \$ and also using escape codes. -config CONFIG_FEATURE_SH_EXTRA_QUIET - bool "Hide message on interactive shell startup" - default n - depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH - help - Remove the busybox introduction when starting a shell. - endmenu - diff --git a/shell/cmdedit.c b/shell/cmdedit.c index a78642b9d..884489b45 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c @@ -49,11 +49,7 @@ #define Isprint(c) ( (c) >= ' ' && (c) != ((unsigned char)'\233') ) #endif -#ifndef TEST - -#define D(x) - -#else +#ifdef TEST /* pretect redefined for test */ #undef CONFIG_FEATURE_COMMAND_EDITING @@ -68,8 +64,6 @@ #define CONFIG_FEATURE_NONPRINTABLE_INVERSE_PUT #define CONFIG_FEATURE_CLEAN_UP -#define D(x) x - #endif /* TEST */ #ifdef CONFIG_FEATURE_COMMAND_TAB_COMPLETION @@ -79,10 +73,6 @@ #ifdef CONFIG_FEATURE_COMMAND_EDITING -#ifndef CONFIG_FEATURE_COMMAND_TAB_COMPLETION -#undef CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION -#endif - #if defined(CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION) || defined(CONFIG_FEATURE_SH_FANCY_PROMPT) #define CONFIG_FEATURE_GETUSERNAME_AND_HOMEDIR #endif