All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] skip `.' and `..' directories in TAB completion
@ 2008-01-04 12:14 Robert Millan
  2008-01-05  1:35 ` Yoshinori K. Okuji
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2008-01-04 12:14 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]


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 /.)

[-- Attachment #2: completion.diff --]
[-- Type: text/x-diff, Size: 584 bytes --]


	* 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];
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] skip `.' and `..' directories in TAB completion
  2008-01-04 12:14 [PATCH] skip `.' and `..' directories in TAB completion Robert Millan
@ 2008-01-05  1:35 ` Yoshinori K. Okuji
  2008-01-05 11:58   ` Robert Millan
  0 siblings, 1 reply; 3+ messages in thread
From: Yoshinori K. Okuji @ 2008-01-05  1:35 UTC (permalink / raw)
  To: The development of GRUB 2

On Friday 04 January 2008 13:14, Robert Millan wrote:
> This patch skips . and .. directories in tab completion.  They're basicaly
> useless to the user, and this mimics bash completion behaviour.

Okay for me.

Thanks,
Okuji



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] skip `.' and `..' directories in TAB completion
  2008-01-05  1:35 ` Yoshinori K. Okuji
@ 2008-01-05 11:58   ` Robert Millan
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Millan @ 2008-01-05 11:58 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Jan 05, 2008 at 02:35:35AM +0100, Yoshinori K. Okuji wrote:
> On Friday 04 January 2008 13:14, Robert Millan wrote:
> > This patch skips . and .. directories in tab completion.  They're basicaly
> > useless to the user, and this mimics bash completion behaviour.
> 
> Okay for me.

Committed.

-- 
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 /.)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-05 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 12:14 [PATCH] skip `.' and `..' directories in TAB completion Robert Millan
2008-01-05  1:35 ` Yoshinori K. Okuji
2008-01-05 11:58   ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.