Q:

Zsh: Behaviour of zargs with empty list - ist this a bug or a feature? 

I stumbled today over the following problem in zsh 5.1.1 (simplified example):
#! /bin/zsh
autoload -U zargs
zargs -- my*files(N) -- rm -v

This worked fine, until one day, there were no files matching my pattern.  Because of the (N), the command turned into
zargs -- -- rm -v

I had expected, that in this case rm would not be called at all, in a similar vain where xargs does not call the command if the imput is empty.  However, rm was called once, without arguments, which then had the effect that an error message was written. 
Indeed, we can see that 
zargs -- -- echo xxx

also invokes echo once.  
The documentation of zargs in the man page is not really clear in this respects, but I think that without arguments, the command should not be invoked at all. 
Do we have a bug, or is zargs really supposed to work in this way? 

A:

zargs works in this way similar to GNU xargs today (ugh...). 
We could use the -r, --no-run-if-empty option. 
zargs inherits this property from GNU xargs, from zargs --help:
-r, --no-run-if-empty        if there are no arguments, then do not run COMMAND;
                             if this option is not given, COMMAND will be
                             run at least once

GNU xargs has this feature:

-r, --no-run-if-empty
  If the standard input does not contain any nonblanks, do not run the
  command.   Normally, the command is run once even if there is no input. 
  This option is a GNU extension. 
  --xargs.1 nroff source

(Un?)fortunately, FreeBSD and NetBSD's have the counter feature like this:

-r
         Compatibility with GNU xargs.   The GNU version of xargs runs the
           utility argument at least once, even if xargs input is empty, and
           it supports a -r option to inhibit this behavior.   The FreeBSD
           version of xargs does not run the utility argument on empty
           input, but it supports the -r option for command-line compatibility
           with GNU xargs, but the -r option does nothing in the FreeBSD
           version of xargs. 
  --FreeBSD xargs(1)

