enable use of ^V prefix to allow forced insertion of any character. in
authorPaul Fox <pgf@brightstareng.com>
Fri, 11 Jan 2008 16:50:08 +0000 (16:50 -0000)
committerPaul Fox <pgf@brightstareng.com>
Fri, 11 Jan 2008 16:50:08 +0000 (16:50 -0000)
particular, without this it's impossible to enter a TAB on the commandline
(whether tab completion is enabled or not).

libbb/lineedit.c

index e31ddad5d3907be942f901329e5bf9e58379325e..cbe2bb9164115c68f3f08eebe8158bc060f3022d 100644 (file)
@@ -1752,8 +1752,8 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
                        break;
 
                default:        /* If it's regular input, do the normal thing */
-#if ENABLE_FEATURE_NONPRINTABLE_INVERSE_PUT
-                       /* Control-V -- Add non-printable symbol */
+
+                       /* Control-V -- force insert of next char */
                        if (c == CTRL('V')) {
                                if (safe_read(STDIN_FILENO, &c, 1) < 1)
                                        goto prepare_to_die;
@@ -1761,8 +1761,7 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
                                        beep();
                                        break;
                                }
-                       } else
-#endif
+                       }
 
 #if ENABLE_FEATURE_EDITING_VI
                        if (vi_cmdmode)  /* Don't self-insert */