From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8239 invoked from network); 6 Sep 2003 19:41:05 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 6 Sep 2003 19:41:05 -0000 Received: (qmail 10742 invoked by alias); 6 Sep 2003 19:40:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19034 Received: (qmail 10731 invoked from network); 6 Sep 2003 19:40:59 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 6 Sep 2003 19:40:59 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [217.174.194.138] by sunsite.dk (MessageWall 1.0.8) with SMTP; 6 Sep 2003 19:40:58 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id h86Jev417250 for ; Sat, 6 Sep 2003 21:40:57 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <19vixr-000037-00>; Sat, 6 Sep 2003 21:43:19 +0200 Date: Sat, 6 Sep 2003 21:43:19 +0200 From: DervishD To: Zsh Subject: Little doubt about an expansion flag Message-ID: <20030906194319.GA175@DervishD> Mail-Followup-To: Zsh Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Hi all :)) When looking at the recipe Oliver gave me for getting the pid of a running process a few days ago, I discovered the (f) flag to parameter expansion, which, according to the manual, means that the expansion is split into lines (a shorthand for (ps:\n:). Why is this splitting needed? I mean, the recipe is: ${${${(M)${(f)"$(ps xh)"}:#*$name*}## #}%% *} and I'm looking (deciphering is more appropriate) at the first part, namely ${(f)"$(ps xh)"}. When doing this, the output of the ps command is *joined*, deleting the \n characters!!! Obviously there is something I don't understand in the (f) flag and in word splitting O:))) It can even be my bad english, who knows? Finally, I would like to know how the shell manages to parse this: "${(f)"$(ps xh)"}", because it seems that the shell can read my mind and parses the quotes nested, and not like "${(f)" $(ps xh) "}". There are more of these ambiguities? How deals the shell with them? Please excuse me for making so many questions about Zsh, but I really want to know more of this shell. I'm amazed! Thanks a lot in advance for being so kind with me when asking ;)) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/