1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 16:50:58 +01:00

21758: optimise =(<<<...) to run within the shell.

This commit is contained in:
Peter Stephenson 2005-09-23 17:03:16 +00:00
parent ced5aab522
commit ad2bd42c85
4 changed files with 77 additions and 13 deletions

View file

@ -340,6 +340,15 @@ process. This may be used instead of the tt(<)
form for a program that expects to lseek (see manref(lseek)(2))
on the input file.
There is an optimisation for substitutions of the form
tt(=LPAR()<<<)var(arg)tt(RPAR()), where var(arg) is a single-word argument
to the here-string redirection tt(<<<). This form produces a file name
containing the value of var(arg) after any substitutions have been
performed. This is handled entirely within the current shell. This is
effectively the reverse of the special form tt($LPAR()<)var(arg)tt(RPAR())
which treats var(arg) as a file name and replaces it with the file's
contents.
The tt(=) form is useful as both the tt(/dev/fd) and the named pipe
implementation of tt(<LPAR())var(...)tt(RPAR()) have drawbacks. In
the former case, some programmes may automatically close the file