This patch skips . and .. directories in tab completion. They're basicaly
useless to the user, and this mimics bash completion behaviour.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
* normal/completion.c (iterate_dir): Skip `.' and `..' directories.
diff -urp -x CVS grub2/normal/completion.c grub2.completion/normal/completion.c
--- grub2/normal/completion.c 2007-09-03 22:28:24.000000000 +0200
+++ grub2.completion/normal/completion.c 2008-01-04 13:11:49.000000000 +0100
@@ -138,7 +138,7 @@ iterate_dir (const char *filename, int d
if (add_completion (filename, prefix, GRUB_COMPLETION_TYPE_FILE))
return 1;
}
- else
+ else if (grub_strcmp (filename, ".") && grub_strcmp (filename, ".."))
{
char fname[grub_strlen (filename) + 2];
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel