Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: SImple way to execute command on list of files?



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