[BusyBox] Control-W for busybox shells.
James A. Morrison
jim at nit.ca
Wed Oct 29 00:40:32 UTC 2003
Hey,
Here is a patch to add Control-W support to the busybox shells.
This is against 1.00-pre3.
Jim
--- cmdedit.c.old 2003-10-28 19:35:04.000000000 -0500
+++ cmdedit.c 2003-10-28 19:35:08.000000000 -0500
@@ -1365,6 +1365,13 @@
redraw(cmdedit_y, len -= cursor);
}
break;
+ case 23:
+ /* Control-W -- Remove the last word */
+ while (cursor > 0 && isspace(command[cursor-1]))
+ input_backspace();
+ while (cursor > 0 &&!isspace(command[cursor-1]))
+ input_backspace();
+ break;
case ESC:{
/* escape sequence follows */
if (safe_read(0, &c, 1) < 1)
More information about the busybox
mailing list