From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27542 invoked by alias); 18 Jan 2015 19:46:45 -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: 19742 Received: (qmail 14590 invoked from network); 18 Jan 2015 19:46:44 -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=Jm2CqS96dkl0o/EVbOY7rtzTwjx6/So6D0Lu3MmhhoM=; b=HruUaxa8Q/MohsgvF5eMAfhXhunRSQJymzmhE3WlDSusOnoccSpU2XavCfAfE9DDOb Z8cJEZzecEQZfDj2ZaThyqprXpdGvXHZ0w0nRH1aLDYr69CVbIm7RDwvWQiaZ5qJl5y/ WwJIMoMChX6imFqyLqfQU4Ac3SDjn/Nt3KDoUs4O90ZlI3YIS8GFg9ueT1wVKHCbKV4A NJs+fiCRxhy3ihuNjrdUtN5syDoW0lf0K2dtNbtMnSd7etbn+L1f67VrChdh+fL1sQ7Z quQ9e0SdpjO5HrPQlB5mOzNAmvDvPAEhkDFQEf6n9kQaOMBo06f0M6T1/jbUJFAKOTii qm6Q== MIME-Version: 1.0 X-Received: by 10.194.5.37 with SMTP id p5mr53362991wjp.20.1421610400916; Sun, 18 Jan 2015 11:46:40 -0800 (PST) Sender: nikolai.weibull@gmail.com In-Reply-To: <4640221421609498@web10g.yandex.ru> References: <4640221421609498@web10g.yandex.ru> Date: Sun, 18 Jan 2015 20:46:40 +0100 X-Google-Sender-Auth: K4QYbP0TzD-j9XtGvFVkXHNIgn8 Message-ID: Subject: Re: Equivalent of set -- *(DN) in sh From: Nikolai Weibull To: ZyX Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Jan 18, 2015 at 8:31 PM, ZyX wrote: > 18.01.2015, 21:36, "Nikolai Weibull" : >> Is there any way to get the equivalent of Zsh=E2=80=99s >> >> 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. > If you are OK with bash then you may use `shopt -s nullglob; shopt -s dot= glob` and use `set -- *`. I=E2=80=99m not. Depending on Bash is like depending on Zsh these days, I= =E2=80=99d say, in terms of availability. > Note that solution posted by Roman Neuhauser does handle names with space= s and tabs, but not newlines, if you set $IFS to a newline. As-is it has pr= oblems with all characters in IFS which are not just space, but also tab an= d newline. The solution has to be functionally equivalent.