Skip to contentSkip to conversation

Abort cat command with ESC

PATCH In review Christian Franke 2 participants 2 messages Feb 14, 2008 – Feb 17, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Abort cat command with ESC

A minor feature addition.

2008-02-14 Christian Franke <[email protected]>

* commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.

commands/cat.c +6 -0
@@ -59,6 +59,12 @@ grub_cmd_cat (struct grub_arg_list *stat
 	      grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
 	    }
 	}
+
+      if (GRUB_TERM_ASCII_CHAR (grub_checkkey ()) == GRUB_TERM_ESC)
+	{
+	  grub_getkey ();
+	  break;
+	}
     }
 
   grub_putchar ('\n');
#1 lore raw

Committed.

Quoted 29 lines · Christian Franke

A minor feature addition.

2008-02-14 Christian Franke <[email protected]>

* commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.

commands/cat.c +6 -0
@@ -59,6 +59,12 @@ grub_cmd_cat (struct grub_arg_list *stat
 	      grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
 	    }
 	}
+
+      if (GRUB_TERM_ASCII_CHAR (grub_checkkey ()) == GRUB_TERM_ESC)
+	{
+	  grub_getkey ();
+	  break;
+	}
     }
 
   grub_putchar ('\n');

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 5 lines
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 /.)