+ attron(A_BOLD);
+ printw("Command: ");
+ attron(underline);
+ code = getnstr(buffer, length);
+ /*
+ * If this returns anything except ERR/OK, it would be one of ncurses's
+ * extensions. Fill the buffer with something harmless that the shell
+ * will execute as a comment.
+ */
+#ifdef KEY_EVENT
+ if (code == KEY_EVENT)
+ strcpy(buffer, "# event!");
+#endif
+#ifdef KEY_RESIZE
+ if (code == KEY_RESIZE) {
+ strcpy(buffer, "# resize!");
+ getch();
+ }
+#endif
+ attroff(underline);
+ attroff(A_BOLD);
+ printw("\n");