On 2/27/12 8:07 AM, Davide Baldini wrote: >> "If word is unquoted, all lines of the here-document are subjected to >> parameter expansion, command substitution, and arithmetic expansion." >> >> No pathname expansion. > > That section of manual doesn't specifically include word splitting nor > pathname expansion into the list of performed expansions, but the word > splitting does include itself unconditionally:
That's a pretty literal reading of the document. If you want to be just as literal, the cited sections only mention expansions in the context of being "performed on the command line after it has been split into words." Not here-documents at all. Ridiculous, you say? No more so than not believing what the text says. > >> Word Splitting >> The shell scans the results of parameter expansion, command substitu- >> tion, and arithmetic expansion that did not occur within double quotes >> for word splitting. > > and pathname expansion ties itself to word splitting: > >> Pathname Expansion >> After word splitting, [...] > > If intended behaviour is to exclude some expansions from performing word > splitting or pathname expansion, they should be specifically pointed out > in the manual, like the assignment operator section does: So what you would like, basically, is that all cases where expansions take place list both the expansions performed and the ones not performed? Shouldn't the former be sufficient? Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/