From 7d6a248f2c68d70f58387afc69e73e695c3d940c Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 4 May 2020 23:20:08 -0400 Subject: rc: move free carat handling into parser This fixes at least one shell script (printfont) that expected 'x'`{y}'z' to mean 'x'^`{y}^'z' as it now does. Before it meant: 'x'^`{y} 'z' One surprise is that adjacent lists get a free carat: (x y z)(1 2 3) is (x1 y2 z3) This doesn't affect any rc script in Plan 9 or plan9port. --- man/man1/rc.1 | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'man/man1/rc.1') diff --git a/man/man1/rc.1 b/man/man1/rc.1 index 7ea8998a..df7af05b 100644 --- a/man/man1/rc.1 +++ b/man/man1/rc.1 @@ -290,28 +290,10 @@ then one operand must have one component, and the other must be non-empty, and concatenation is distributive. .PD .SS Free Carets -In most circumstances, -.I rc +.I Rc will insert the .B ^ operator automatically between words that are not separated by white space. -Whenever one of -.B $ -.B ' -.B ` -follows a quoted or unquoted word or an unquoted word follows a quoted word -with no intervening blanks or tabs, -a -.B ^ -is inserted between the two. -If an unquoted word immediately follows a -.BR $ -and contains a character other than an alphanumeric, underscore, -or -.BR * , -a -.B ^ -is inserted before the first such character. Thus .IP .B cc -$flags $stem.c @@ -367,7 +349,7 @@ or .I Fd1 is a previously opened file descriptor and .I fd0 -becomes a new copy (in the sense of +becomes a new copy (in the sense of .IR dup (3)) of it. A file descriptor may be closed by writing @@ -477,7 +459,7 @@ is executed. The .I command is executed once for each -.IR argument +.IR argument with that argument assigned to .IR name . If the argument list is omitted, @@ -982,8 +964,6 @@ changes .PP Functions that use here documents don't work. .PP -Free carets don't get inserted next to keywords. -.PP The .BI <{ command } syntax depends on the underlying operating system -- cgit v1.2.3