summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/more/ncommand.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/usr.bin/more/ncommand.c b/usr.bin/more/ncommand.c
index 14856223dccd..705afa0766ce 100644
--- a/usr.bin/more/ncommand.c
+++ b/usr.bin/more/ncommand.c
@@ -238,11 +238,11 @@ void **getstr_curctxt = getstr_ctxts;
/*
* Read a single argument string from a command string. This understands
* $variables, "double quotes", 'single quotes', and backslash escapes
- * for \\, \$, \n, \e, \t, and \" (the latter only inside double quotes). A
- * string may be delimited by double quotes or spaces, not both (duh). It
- * may be worthwhile to add another quotation style in which arithmetic
- * expressions are expanded. Currently an arithmetic expression is expanded
- * iff it is the only component of the string.
+ * for \\, \$, \n, \e, \t, and \". A string may be delimited by double
+ * quotes or spaces, not both (duh). It may be worthwhile to add
+ * another quotation style in which arithmetic expressions are expanded.
+ * Currently an arithmetic expression is expanded iff it is the only
+ * component of the string.
*
* Returns a pointer to the beginning of the string or NULL if it was unable to
* read a string. The line is modified to point somewhere between the end of
@@ -324,12 +324,16 @@ getstr(line)
case '\\':
switch (*(*line + 1)) {
case '\\': case '$': case '\'':
- case 't': case ' ': case ';':
+ case ' ': case ';':
hack[0] = *(*line + 1);
hack[1] = '\0';
c = hack;
(*line) += 2;
break;
+ case 't':
+ c = "\t";
+ (*line) += 2;
+ break;
case 'n':
c = "\n";
(*line) += 2;