Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: SImple way to execute command on list of files?
- X-seq: zsh-users 23933
- From: "Anthony Heading" <anthony@xxxxxxxx>
- To: "Dominik Vogt" <dominik.vogt@xxxxxx>, "Zsh Users" <zsh-users@xxxxxxx>
- Subject: Re: SImple way to execute command on list of files?
- Date: Tue, 16 Apr 2019 22:09:54 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ajrh.net; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=mesmtp; bh=syBpAAb0951b4YmjSw7I+GzMCZb+ CLBQLo0Z+GPV8PQ=; b=bxq1JzBs3Lwzzq8z2sq5kW1I0OKcIPmA/FpmCn9XSZen kMN8QdFSEwmmvo3k0D30gq8zcjKfpBB6AKZOPXuzKuQwBlVsaP+ClF+xjgcuG3z4 VlQ+a32lSmzI87qInDnCN6sDUX7gHHdnvGf2xXsbn8D6fNgdas+ybkRLPD2eAKo=
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=syBpAA b0951b4YmjSw7I+GzMCZb+CLBQLo0Z+GPV8PQ=; b=rqTCz+3LsaBoBnqzGSq08U RVqtsFTU56cRrS8nE+o6ZH29jjqk6In0zqikmfP/hcf0bbGQQl9LIlJtcWbkBxYz 2ledOKuuamOlYBnIT00O/72aYqtGkf+riQRSUpFJJFQLNb7WLB5n87BDIaLWyEXW 6N6EJAepguV5n4c10x4nlKyvTDwUnMDBZGqIYApwlGqqvaqc//X/lfh89rVraKQz HKjp+EzSrwwOI9HrgvaU8Q/qM+/J90Sg+eq0zyF4XHNeEv85upnTNuf+z4c1vKHI NUvrgjHqtbog7sX6sKFJQ1TDelkMlG87W5hqUlKpkcUJDoVimCy3NduaT7PsPMMg ==
- In-reply-to: <20190414084632.t4gdc2fjswogznxy@gmx.de>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20190414084632.t4gdc2fjswogznxy@gmx.de>
On Tue, Apr 16, 2019, at 10:03 PM, Dominik Vogt wrote:
> but is there a more general way where you can define a list of
> commands to treat differently, say
>
> annoying_commands xpdf ps2pdf gv
>
something like this maybe?
wrap_annoying_command() { local i; for i in $~2; $1 $i }
annoying_commands() { local i; for i in $@; alias $i="noglob wrap_annoying_command $i" }
annoying_commands xpdf ps2pdf gv
Messages sorted by:
Reverse Date,
Date,
Thread,
Author