diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-09 21:31:55 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-09 21:31:55 -0700 |
commit | b7d702fc7c3e6604e1f97aceaf66fd71d41b8856 (patch) | |
tree | b1070a00179a6a52d0e351c6636147eef7e4f6b0 | |
parent | 7e774671e12c640ddd87973c80250885527c2dd8 (diff) | |
download | syslinux-b7d702fc7c3e6604e1f97aceaf66fd71d41b8856.tar.gz |
Add Tab display of labelssyslinux-3.72-pre6
When the Tab key is pressed, display a list of matching labels. This
can be disabled via the NOCOMPLETE configuration command. This is a
slightly modified patch by Sebastian Herbszt.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | core/keywords | 1 | ||||
-rw-r--r-- | core/keywords.inc | 1 | ||||
-rw-r--r-- | core/parseconfig.inc | 1 | ||||
-rw-r--r-- | core/ui.inc | 45 | ||||
-rw-r--r-- | doc/syslinux.txt | 4 |
6 files changed, 55 insertions, 0 deletions
@@ -21,6 +21,9 @@ Changes in 3.72: * Remote gdb support for COM32 modules; patch from Stefan Hajnoczi. * Support beeps in F-key help in the simple menu system. + * Tab display of labels, based on a patch from Sebastian + Herbszt. Can be disabled with the NOCOMPLETE configuration + command. Changes in 3.71: * Workaround for a VESA BIOS which tries to make DOS system diff --git a/core/keywords b/core/keywords index 16fe7720..7cd9ace5 100644 --- a/core/keywords +++ b/core/keywords @@ -30,6 +30,7 @@ allowoptions ontimeout onerror noescape +nocomplete f0 f1 f2 diff --git a/core/keywords.inc b/core/keywords.inc index 973d15b6..f563b9d4 100644 --- a/core/keywords.inc +++ b/core/keywords.inc @@ -75,6 +75,7 @@ keywd_table: keyword onerror, pc_onerror keyword allowoptions, pc_setint16, AllowOptions keyword noescape, pc_setint16, NoEscape + keyword nocomplete, pc_setint16, NoComplete keyword f1, pc_filename, FKeyN(1) keyword f2, pc_filename, FKeyN(2) keyword f3, pc_filename, FKeyN(3) diff --git a/core/parseconfig.inc b/core/parseconfig.inc index 4a38c35d..55d6fbb0 100644 --- a/core/parseconfig.inc +++ b/core/parseconfig.inc @@ -463,6 +463,7 @@ OnerrorLen dw 0 ; Bytes in onerror command CmdLinePtr dw cmd_line_here ; Command line advancing pointer ForcePrompt dw 0 ; Force prompt NoEscape dw 0 ; No escape +NoComplete dw 0 ; No label completion on TAB key AllowImplicit dw 1 ; Allow implicit kernels AllowOptions dw 1 ; User-specified options allowed IncludeLevel dw 1 ; Nesting level diff --git a/core/ui.inc b/core/ui.inc index 26b6fa09..4f5b1fdc 100644 --- a/core/ui.inc +++ b/core/ui.inc @@ -108,6 +108,8 @@ enter_char: test byte [FuncFlag],1 not_ascii: cmp al,0Dh ; Enter je command_done + cmp al,09h ; Tab + je display_labels cmp al,'F' & 1Fh ; <Ctrl-F> je set_func_flag %if IS_PXELINUX @@ -142,6 +144,49 @@ set_func_flag: mov byte [FuncFlag],1 jmp short get_char_2 +display_labels: + cmp word [NoComplete],0 ; Label completion enabled? + jne get_char_2 + push di ; Save pointer + mov cx,di + sub cx,command_line + call crlf + mov esi,[HighMemSize] ; Start from top of memory +.scan: + cmp esi,[VKernelEnd] + jbe .not_vk + + push cx ; save command line size + + mov di,VKernelBuf + call rllunpack + ; ESI updated on return + + sub di,cx ; Return to beginning of buf + pop cx ; restore command line size + push si ; save SI + cmp cx,0 + jz .print + push di + push cx + mov si,command_line + es repe cmpsb + pop cx + pop di + jne .next +.print: + mov al,' ' + call writechr + + mov si,di + call writestr +.next: + pop si ; restore SI + jmp .scan +.not_vk: + call crlf + jmp fk_wrcmd + ctrl_f: xor ah,ah mov [FuncFlag],ah diff --git a/doc/syslinux.txt b/doc/syslinux.txt index 54be427b..dd7608e4 100644 --- a/doc/syslinux.txt +++ b/doc/syslinux.txt @@ -399,6 +399,10 @@ NOESCAPE flag_val Lock escapes. Use this (together with PROMPT 0) to force the default boot alternative. +NOCOMPLETE flag_val + If flag_val is set to 1, the Tab key does not display labels + at the boot: prompt. + F1 filename F2 filename ...etc... |