summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-04-15 18:22:41 +0000
committerwdenk <wdenk>2004-04-15 18:22:41 +0000
commit04a85b3b36fdbaaac5fa95d61f59f481bbcf7520 (patch)
treea4c6731a78805c51f43a8b195034d2036b28941b /common/main.c
parentd716b126718d874f52ffb694e6c22b7235cec483 (diff)
downloadu-boot-imx-04a85b3b36fdbaaac5fa95d61f59f481bbcf7520.zip
u-boot-imx-04a85b3b36fdbaaac5fa95d61f59f481bbcf7520.tar.gz
u-boot-imx-04a85b3b36fdbaaac5fa95d61f59f481bbcf7520.tar.bz2
* Patches by Pantelis Antoniou, 30 Mar 2004:
- add auto-complete support to the U-Boot CLI - add support for NETTA and NETPHONE boards; fix NETVIA board * Patch by Yuli Barcohen, 28 Mar 2004: - Add support for MPC8272 family including MPC8247/8248/8271/8272 - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS) - Change configuration method for MPC8260ADS family
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index 156e4bc..7ce9b75 100644
--- a/common/main.c
+++ b/common/main.c
@@ -365,6 +365,10 @@ void main_loop (void)
u_boot_hush_start ();
#endif
+#ifdef CONFIG_AUTO_COMPLETE
+ install_auto_complete();
+#endif
+
#ifdef CONFIG_PREBOOT
if ((p = getenv ("preboot")) != NULL) {
# ifdef CONFIG_AUTOBOOT_KEYED
@@ -608,6 +612,14 @@ int readline (const char *const prompt)
*/
if (n < CFG_CBSIZE-2) {
if (c == '\t') { /* expand TABs */
+#ifdef CONFIG_AUTO_COMPLETE
+ /* if auto completion triggered just continue */
+ *p = '\0';
+ if (cmd_auto_complete(prompt, console_buffer, &n, &col)) {
+ p = console_buffer + n; /* reset */
+ continue;
+ }
+#endif
puts (tab_seq+(col&07));
col += 8 - (col&07);
} else {