aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorPaul Fox <pgf@brightstareng.com>2008-01-11 16:50:08 +0000
committerPaul Fox <pgf@brightstareng.com>2008-01-11 16:50:08 +0000
commit84bbac5a093c38fb75740c302b3b0f1619077b6b (patch)
treeff54ce314541cb11fbe1729d7d452f27dd724f35 /libbb/lineedit.c
parentee8e3ee9190d3b5da6bc1c7537473b8d0e7e813b (diff)
downloadbusybox-w32-84bbac5a093c38fb75740c302b3b0f1619077b6b.tar.gz
busybox-w32-84bbac5a093c38fb75740c302b3b0f1619077b6b.tar.bz2
busybox-w32-84bbac5a093c38fb75740c302b3b0f1619077b6b.zip
enable use of ^V prefix to allow forced insertion of any character. in
particular, without this it's impossible to enter a TAB on the commandline (whether tab completion is enabled or not).
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index e31ddad5d..cbe2bb916 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1752,8 +1752,8 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
1752 break; 1752 break;
1753 1753
1754 default: /* If it's regular input, do the normal thing */ 1754 default: /* If it's regular input, do the normal thing */
1755#if ENABLE_FEATURE_NONPRINTABLE_INVERSE_PUT 1755
1756 /* Control-V -- Add non-printable symbol */ 1756 /* Control-V -- force insert of next char */
1757 if (c == CTRL('V')) { 1757 if (c == CTRL('V')) {
1758 if (safe_read(STDIN_FILENO, &c, 1) < 1) 1758 if (safe_read(STDIN_FILENO, &c, 1) < 1)
1759 goto prepare_to_die; 1759 goto prepare_to_die;
@@ -1761,8 +1761,7 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
1761 beep(); 1761 beep();
1762 break; 1762 break;
1763 } 1763 }
1764 } else 1764 }
1765#endif
1766 1765
1767#if ENABLE_FEATURE_EDITING_VI 1766#if ENABLE_FEATURE_EDITING_VI
1768 if (vi_cmdmode) /* Don't self-insert */ 1767 if (vi_cmdmode) /* Don't self-insert */