diff options
| author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-01-03 12:07:32 +0000 |
|---|---|---|
| committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-01-03 12:07:32 +0000 |
| commit | 3b85a2ee7782abfc2ed6729b03f57b1d2a4448b3 (patch) | |
| tree | 515879419d105152819dde4b8f52afd78ce4d11b /shell | |
| parent | 32d0d2ea2e4a2243d7a391c4a19e56257edbf5c7 (diff) | |
| download | busybox-w32-3b85a2ee7782abfc2ed6729b03f57b1d2a4448b3.tar.gz busybox-w32-3b85a2ee7782abfc2ed6729b03f57b1d2a4448b3.tar.bz2 busybox-w32-3b85a2ee7782abfc2ed6729b03f57b1d2a4448b3.zip | |
Declare dependencies of command line editing in the build system
git-svn-id: svn://busybox.net/trunk/busybox@8244 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/Config.in | 67 | ||||
| -rw-r--r-- | shell/cmdedit.c | 12 |
2 files changed, 34 insertions, 45 deletions
diff --git a/shell/Config.in b/shell/Config.in index 016af719a..892b96e78 100644 --- a/shell/Config.in +++ b/shell/Config.in | |||
| @@ -137,71 +137,70 @@ config CONFIG_MSH | |||
| 137 | comment "Bourne Shell Options" | 137 | comment "Bourne Shell Options" |
| 138 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | 138 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH |
| 139 | 139 | ||
| 140 | config CONFIG_FEATURE_COMMAND_EDITING | 140 | config CONFIG_FEATURE_SH_EXTRA_QUIET |
| 141 | bool "command line editing" | 141 | bool "Hide message on interactive shell startup" |
| 142 | default n | 142 | default n |
| 143 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | 143 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH |
| 144 | help | 144 | help |
| 145 | Enable command editing in shell. | 145 | Remove the busybox introduction when starting a shell. |
| 146 | 146 | ||
| 147 | config CONFIG_FEATURE_COMMAND_SAVEHISTORY | 147 | config CONFIG_FEATURE_SH_STANDALONE_SHELL |
| 148 | bool " history saving" | 148 | bool "Standalone shell" |
| 149 | default n | 149 | default n |
| 150 | depends on CONFIG_ASH | 150 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH |
| 151 | help | 151 | help |
| 152 | Enable history saving in ash shell. | 152 | Have all the busybox commands built into the shell, creating |
| 153 | a standalone shell. | ||
| 153 | 154 | ||
| 154 | config CONFIG_FEATURE_COMMAND_TAB_COMPLETION | 155 | config CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN |
| 155 | bool "tab completion" | 156 | bool "Standalone shell -- applets always win" |
| 156 | default n | 157 | default n |
| 157 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | 158 | depends on CONFIG_FEATURE_SH_STANDALONE_SHELL |
| 158 | help | 159 | help |
| 159 | Enable tab completion in shell. | 160 | Use a command builtin to the shell over one with the same name, |
| 161 | that may be on the system. | ||
| 160 | 162 | ||
| 161 | config CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION | 163 | config CONFIG_FEATURE_COMMAND_EDITING |
| 162 | bool "username completion" | 164 | bool "command line editing" |
| 163 | default n | 165 | default n |
| 164 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | 166 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH |
| 165 | help | 167 | help |
| 166 | Enable username completion in shell. | 168 | Enable command editing in shell. |
| 167 | 169 | ||
| 168 | config CONFIG_FEATURE_COMMAND_HISTORY | 170 | config CONFIG_FEATURE_COMMAND_HISTORY |
| 169 | int "history size" | 171 | int "history size" |
| 170 | default 15 | 172 | default 15 |
| 171 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | 173 | depends on CONFIG_FEATURE_COMMAND_EDITING |
| 172 | help | 174 | help |
| 173 | Specify command history size in shell. | 175 | Specify command history size in shell. |
| 174 | 176 | ||
| 175 | config CONFIG_FEATURE_SH_STANDALONE_SHELL | 177 | config CONFIG_FEATURE_COMMAND_SAVEHISTORY |
| 176 | bool "Standalone shell" | 178 | bool "history saving" |
| 177 | default n | 179 | default n |
| 178 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | 180 | depends on CONFIG_ASH && CONFIG_FEATURE_COMMAND_EDITING |
| 179 | help | 181 | help |
| 180 | Have all the busybox commands built into the shell, creating | 182 | Enable history saving in ash shell. |
| 181 | a standalone shell. | ||
| 182 | 183 | ||
| 183 | config CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN | 184 | config CONFIG_FEATURE_COMMAND_TAB_COMPLETION |
| 184 | bool "Standalone shell -- applets always win" | 185 | bool "tab completion" |
| 185 | default n | 186 | default n |
| 186 | depends on CONFIG_FEATURE_SH_STANDALONE_SHELL | 187 | depends on CONFIG_FEATURE_COMMAND_EDITING |
| 187 | help | 188 | help |
| 188 | Use a command builtin to the shell over one with the same name, | 189 | Enable tab completion in shell. |
| 189 | that may be on the system. | 190 | |
| 191 | config CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION | ||
| 192 | bool "username completion" | ||
| 193 | default n | ||
| 194 | depends on CONFIG_FEATURE_COMMAND_TAB_COMPLETION | ||
| 195 | help | ||
| 196 | Enable username completion in shell. | ||
| 190 | 197 | ||
| 191 | config CONFIG_FEATURE_SH_FANCY_PROMPT | 198 | config CONFIG_FEATURE_SH_FANCY_PROMPT |
| 192 | bool "Fancy shell prompts" | 199 | bool "Fancy shell prompts" |
| 193 | default n | 200 | default n |
| 194 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | 201 | depends on CONFIG_FEATURE_COMMAND_EDITING |
| 195 | help | 202 | help |
| 196 | Setting this option allows for prompts to use things like \w and | 203 | Setting this option allows for prompts to use things like \w and |
| 197 | \$ and also using escape codes. | 204 | \$ and also using escape codes. |
| 198 | 205 | ||
| 199 | config CONFIG_FEATURE_SH_EXTRA_QUIET | ||
| 200 | bool "Hide message on interactive shell startup" | ||
| 201 | default n | ||
| 202 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | ||
| 203 | help | ||
| 204 | Remove the busybox introduction when starting a shell. | ||
| 205 | |||
| 206 | endmenu | 206 | endmenu |
| 207 | |||
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 @@ | |||
| 49 | #define Isprint(c) ( (c) >= ' ' && (c) != ((unsigned char)'\233') ) | 49 | #define Isprint(c) ( (c) >= ' ' && (c) != ((unsigned char)'\233') ) |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | #ifndef TEST | 52 | #ifdef TEST |
| 53 | |||
| 54 | #define D(x) | ||
| 55 | |||
| 56 | #else | ||
| 57 | 53 | ||
| 58 | /* pretect redefined for test */ | 54 | /* pretect redefined for test */ |
| 59 | #undef CONFIG_FEATURE_COMMAND_EDITING | 55 | #undef CONFIG_FEATURE_COMMAND_EDITING |
| @@ -68,8 +64,6 @@ | |||
| 68 | #define CONFIG_FEATURE_NONPRINTABLE_INVERSE_PUT | 64 | #define CONFIG_FEATURE_NONPRINTABLE_INVERSE_PUT |
| 69 | #define CONFIG_FEATURE_CLEAN_UP | 65 | #define CONFIG_FEATURE_CLEAN_UP |
| 70 | 66 | ||
| 71 | #define D(x) x | ||
| 72 | |||
| 73 | #endif /* TEST */ | 67 | #endif /* TEST */ |
| 74 | 68 | ||
| 75 | #ifdef CONFIG_FEATURE_COMMAND_TAB_COMPLETION | 69 | #ifdef CONFIG_FEATURE_COMMAND_TAB_COMPLETION |
| @@ -79,10 +73,6 @@ | |||
| 79 | 73 | ||
| 80 | #ifdef CONFIG_FEATURE_COMMAND_EDITING | 74 | #ifdef CONFIG_FEATURE_COMMAND_EDITING |
| 81 | 75 | ||
| 82 | #ifndef CONFIG_FEATURE_COMMAND_TAB_COMPLETION | ||
| 83 | #undef CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION | ||
| 84 | #endif | ||
| 85 | |||
| 86 | #if defined(CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION) || defined(CONFIG_FEATURE_SH_FANCY_PROMPT) | 76 | #if defined(CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION) || defined(CONFIG_FEATURE_SH_FANCY_PROMPT) |
| 87 | #define CONFIG_FEATURE_GETUSERNAME_AND_HOMEDIR | 77 | #define CONFIG_FEATURE_GETUSERNAME_AND_HOMEDIR |
| 88 | #endif | 78 | #endif |
