From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id aaab92c0 for ; Sun, 14 Apr 2019 13:51:40 +0000 (UTC) Received: (qmail 24350 invoked by alias); 14 Apr 2019 13:51:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44224 Received: (qmail 6949 invoked by uid 1010); 14 Apr 2019 13:51:24 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.1/25412. spamassassin: 3.4.2. Clear:RC:0(195.159.176.226):SA:0(-1.1/5.0):. Processed in 3.912539 secs); 14 Apr 2019 13:51:24 -0000 X-Envelope-From: gcszd-zsh-workers@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at m.gmane.org does not designate permitted sender hosts) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Leah Neukirchen Subject: Re: SImple way to execute command on list of files? Date: Sun, 14 Apr 2019 15:50:36 +0200 Message-ID: <871s24pufn.fsf@vuxu.org> References: <20190414084632.t4gdc2fjswogznxy__31239.9886942998$1555231731$gmane$org@gmx.de> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) In-Reply-To: <20190414084632.t4gdc2fjswogznxy__31239.9886942998$1555231731$gmane$org@gmx.de> (Dominik Vogt's message of "Sun, 14 Apr 2019 09:46:32 +0100") Dominik Vogt writes: > Other than writing an alias or a function, is there a simple way > to call commands that take only one file argument multiple times? > > In other words > > $ xpdf *.pdf > $ ps2pdf a.ps b.ps c.ps > > should be executed (semantically) as > > $ for F in *.pdf; do xpdf "$F"; done > $ ps2pdf a.ps; ps2pdf b.ps; ps2pdf c.ps > > I'm looking for a kind of extension for the command syntax. Of > course I could write a function with that syntax for each command, > but is there a more general way where you can define a list of > commands to treat differently, say > > annoying_commands xpdf ps2pdf gv autoload zargs zargs -n1 *.pdf -- xpdf -- Leah Neukirchen http://leahneukirchen.org/