Hello!
Following is broken in the current version of GRUB:
1) Completion after `(hd0,'
The right solution would be to call print_a_completion() in
real_open_partition() and check_BSD_parts() so that all possible
completions, such as (hd0,2), (hd0,a) and (hd0,2,a) are printed and
considered as candidates for completion
Unfortunately, this may require rewriting set_device() from scratch
2) Mach-style partition notation requires a slash after the
partition name:
grub> root hd0s3a
Device string unrecognizable
grub> root hd0s3a/
Filesystem type is ffs, partition type 0x7a5
The fact that nobody has noticed this before suggests that the
support for the Mach notation could be dropped while rewriting
set_device()
3) Completion for directiories is incorrect:
grub> kernel /bo<TAB>
grub> kernel /boot <the cursor is here>
Possible solutions:
- don't add ' ' (i.e. restore the old behaviour)
- the filesystem code should add '/' to directory names and
print_completions() should only add a space if there is no ending
slash.
- the filesystem code should set a special flag indicating whether
a directory name is printed, so that print_a_completion() adds '/'
- print_a_completion() should add '/', call dir() again and replace
'/' with ' ' if it fails
The last solution, being the ugliest at the first glance, doesn't
actually seem to be slower, because most filesystem don't yet know file
attributes while reading the directory (if I understand correctly,
only FAT stores file attributes in the directory)
But it will save us from touching the code for every filesystem.
Pavel Roskin