From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18639 invoked by alias); 18 Jan 2015 19:44:12 -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: 19741 Received: (qmail 5187 invoked from network); 18 Jan 2015 19:43:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=ss0an5FZ/gHwufD877w+TeesC167hHS7L7120x23ic8=; b=AbPHYpRGGa4RcM5cpVzEnxPDkjwDGngXomZKD6BJr6bb4uKu9TduvaV38HkJHoP59i JUN/pjIOAqzL1BOWsZe/92t7uUHJkUwfg6uySUeUBah3Em9X37ywQCly7w9lYv6+9gRS +rEx9zMoo5qcfRxMK2wk4nqKxmYZ+2njH/Zgvslb47zYTjdZMkXvDFN6fKZ7IYZwDsC6 OAcXyMD6bNf0MHbuw6f1ZWRHxC52TtCTZY9vxSAuX1G+J7n+X3GEfcQA96pg0SgT6mJz eQowVlcSbZ59BEjEwxyoPWXhzZAB+N0pXdpTSBGF8rIl/tO4HK8aHNiaBXhvBmnIHrw5 1RdQ== MIME-Version: 1.0 X-Received: by 10.180.198.209 with SMTP id je17mr27538931wic.17.1421610235163; Sun, 18 Jan 2015 11:43:55 -0800 (PST) Sender: nikolai.weibull@gmail.com In-Reply-To: <20150118190723.GG979@isis.sigpipe.cz> References: <20150118190723.GG979@isis.sigpipe.cz> Date: Sun, 18 Jan 2015 20:43:55 +0100 X-Google-Sender-Auth: P2l5QIf3X3qns7NcNLFiRjVymmA Message-ID: Subject: Re: Equivalent of set -- *(DN) in sh From: Nikolai Weibull To: Roman Neuhauser Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Jan 18, 2015 at 8:07 PM, Roman Neuhauser wro= te: > # now@disu.se / 2015-01-18 19:28:42 +0100: >> Is there any way to get the equivalent of Zsh=C2=B4s >> >> set -- *(DN) >> >> in sh? Most important here would be NULL_GLOB, as, by default, sh >> simply leaves the * if there are no files to match. > > set -- $(find .* * -maxdepth 0 -type d) > > does not handle names with spaces. Which is unsatisfactory, as $() isn=E2=80=99t in all versions of sh, -maxde= pth is GNU specific, and .* and * will be expanded by the shell, not by find, so we=E2=80=99ve gained nothing and lost quite a bit. Oh, and who sa= id anything about only including directories? ;-)