* Re: SImple way to execute command on list of files?
[not found] <20190414084632.t4gdc2fjswogznxy__31239.9886942998$1555231731$gmane$org@gmx.de>
@ 2019-04-14 13:50 ` Leah Neukirchen
2019-04-24 10:53 ` Stephane Chazelas
0 siblings, 1 reply; 2+ messages in thread
From: Leah Neukirchen @ 2019-04-14 13:50 UTC (permalink / raw)
To: zsh-workers
Dominik Vogt <dominik.vogt@gmx.de> 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 <leah@vuxu.org> http://leahneukirchen.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-24 10:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190414084632.t4gdc2fjswogznxy__31239.9886942998$1555231731$gmane$org@gmx.de>
2019-04-14 13:50 ` SImple way to execute command on list of files? Leah Neukirchen
2019-04-24 10:53 ` Stephane Chazelas
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).