diff options
| -rw-r--r-- | parse.y | 2 | ||||
| -rw-r--r-- | rc.1 | 6 |
2 files changed, 5 insertions, 3 deletions
@@ -150,6 +150,8 @@ comword : '$' sword { $$ = mk(nVar,$2); } | FLAT sword { $$ = mk(nFlat, $2); } | '`' sword { $$ = mk(nBackq,nolist,$2); } | '`' brace { $$ = mk(nBackq,nolist,$2); } + | '`' word brace { $$ = mk(nBackq,$2,$3); } + | '`' word sword { $$ = mk(nBackq,$2,$3); } | BACKBACK word brace { $$ = mk(nBackq,$2,$3); } | BACKBACK word sword { $$ = mk(nBackq,$2,$3); } | '(' nlwords ')' { $$ = $2; } @@ -1220,7 +1220,7 @@ In order to override the value of for a single backquote substitution, use: .Ds -.Cr "\`\` (ifs-list) { command }" +.Cr "\`(ifs-list){ command }" .De .PP .Cr $ifs @@ -1228,7 +1228,7 @@ will be temporarily ignored and the command's output will be split as specified the list following the double backquote. For example: .Ds -.Cr "\`\` ($nl :) {cat /etc/passwd}" +.Cr "\`($nl :){cat /etc/passwd}" .De .PP splits up @@ -1244,7 +1244,7 @@ to contain the newline character, and to contain the tab character. Thus, if you want to process everything in the current directory, but in a random order, you could use: .Ds -.Cr "for (f in \`\` $nl {ls | shuf}) { ... process $f }" +.Cr "for (f in \`$nl{ls | shuf}) { ... process $f }" .De .PP This will correctly handle filenames that contain spaces. |