From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29807 invoked by alias); 22 Jun 2015 19:26:41 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20267 Received: (qmail 18241 invoked from network); 22 Jun 2015 19:26:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Message-ID: <5588616C.5090109@necoro.eu> Date: Mon, 22 Jun 2015 21:26:36 +0200 From: lists@necoro.eu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: Re: ls -l *(/)... References: <20150622031753.GA4342@solfire> <55879C40.9020102@necoro.eu> <20150622163654.GB4560@solfire> <55884CFC.6010803@necoro.eu> <20150622190837.GA9569@ramirez.u-strasbg.fr> In-Reply-To: <20150622190837.GA9569@ramirez.u-strasbg.fr> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Am 22.06.2015 um 21:08 schrieb Marc Chantreux: >> Of course you can also iterate over them: >> for f in */*; echo $(basename $f) > > print -l */*:t Thanks, but I just intended the for-loop as a small one-line example :). Because I thought that the original intention might have been something along the lines of for f in `ls */*`; ... or ls */* | ... Also, while such short one-liners using different modificators and qualifiers and what not are nice to show case the might of zsh, I often find them confusing and actually like an explicit for-loop more (except when the for-loop makes stuff more complicated). The reason is, that I write longer zsh-scripts so seldom that I always forget what all those magic letters are for. So I need either a lengthy comment or I always have to read zsh manpages when I happen to stumble of the piece in question again. (Just for the record, though, :t is one of the very few things I actually use :), though I'd probably do echo */*(:t)) Best, René